315 """ |
315 """ |
316 if path not in self.watchedItems: |
316 if path not in self.watchedItems: |
317 # just ignore the situation we don't have a reference to the item |
317 # just ignore the situation we don't have a reference to the item |
318 return |
318 return |
319 |
319 |
320 if Preferences.getUI("BrowsersListHiddenFiles"): |
320 dirFilter = QDir.Filters(QDir.AllEntries | QDir.NoDotAndDotDot) |
321 dirFilter = QDir.Filters( |
|
322 QDir.AllEntries | QDir.Hidden | QDir.NoDotAndDotDot) |
|
323 else: |
|
324 dirFilter = QDir.Filters( |
|
325 QDir.AllEntries | QDir.NoDot | QDir.NoDotDot) |
|
326 |
321 |
327 for itm in self.watchedItems[path]: |
322 for itm in self.watchedItems[path]: |
328 oldCnt = itm.childCount() |
323 oldCnt = itm.childCount() |
329 |
324 |
330 qdir = QDir(itm.dirName()) |
325 qdir = QDir(itm.dirName()) |
550 """ |
545 """ |
551 self._addWatchedItem(parentItem) |
546 self._addWatchedItem(parentItem) |
552 |
547 |
553 qdir = QDir(parentItem.dirName()) |
548 qdir = QDir(parentItem.dirName()) |
554 |
549 |
555 if Preferences.getUI("BrowsersListHiddenFiles"): |
550 dirFilter = QDir.Filters(QDir.AllEntries | QDir.NoDotAndDotDot) |
556 dirFilter = QDir.Filters( |
|
557 QDir.AllEntries | QDir.Hidden | QDir.NoDotAndDotDot) |
|
558 else: |
|
559 dirFilter = QDir.Filters( |
|
560 QDir.AllEntries | QDir.NoDot | QDir.NoDotDot) |
|
561 entryInfoList = qdir.entryInfoList(dirFilter) |
551 entryInfoList = qdir.entryInfoList(dirFilter) |
562 if len(entryInfoList) > 0: |
552 if len(entryInfoList) > 0: |
563 if repopulate: |
553 if repopulate: |
564 self.beginInsertRows( |
554 self.beginInsertRows( |
565 self.createIndex(parentItem.row(), 0, parentItem), |
555 self.createIndex(parentItem.row(), 0, parentItem), |