eric7/UI/BrowserModel.py

branch
eric7
changeset 8318
962bce857696
parent 8312
800c432b34c8
child 8637
394377638256
equal deleted inserted replaced
8316:0c7a44af84bc 8318:962bce857696
10 import os 10 import os
11 import fnmatch 11 import fnmatch
12 import json 12 import json
13 import contextlib 13 import contextlib
14 14
15 from PyQt5.QtCore import ( 15 from PyQt6.QtCore import (
16 QDir, QModelIndex, QAbstractItemModel, QFileSystemWatcher, Qt, QProcess, 16 QDir, QModelIndex, QAbstractItemModel, QFileSystemWatcher, Qt, QProcess,
17 QCoreApplication 17 QCoreApplication
18 ) 18 )
19 from PyQt5.QtGui import QImageReader, QFont 19 from PyQt6.QtGui import QImageReader, QFont
20 from PyQt5.QtWidgets import QApplication 20 from PyQt6.QtWidgets import QApplication
21 21
22 import UI.PixmapCache 22 import UI.PixmapCache
23 import Preferences 23 import Preferences
24 import Utilities 24 import Utilities
25 25
319 """ 319 """
320 if path not in self.watchedItems: 320 if path not in self.watchedItems:
321 # just ignore the situation we don't have a reference to the item 321 # just ignore the situation we don't have a reference to the item
322 return 322 return
323 323
324 dirFilter = QDir.Filters(QDir.Filter.AllEntries | 324 dirFilter = QDir.Filter.AllEntries | QDir.Filter.NoDotAndDotDot
325 QDir.Filter.NoDotAndDotDot)
326 325
327 for itm in self.watchedItems[path]: 326 for itm in self.watchedItems[path]:
328 oldCnt = itm.childCount() 327 oldCnt = itm.childCount()
329 328
330 qdir = QDir(itm.dirName()) 329 qdir = QDir(itm.dirName())
552 """ 551 """
553 self._addWatchedItem(parentItem) 552 self._addWatchedItem(parentItem)
554 553
555 qdir = QDir(parentItem.dirName()) 554 qdir = QDir(parentItem.dirName())
556 555
557 dirFilter = QDir.Filters( 556 dirFilter = (QDir.Filter.AllEntries |
558 QDir.Filter.AllEntries | 557 QDir.Filter.NoDotAndDotDot)
559 QDir.Filter.NoDotAndDotDot)
560 entryInfoList = qdir.entryInfoList(dirFilter) 558 entryInfoList = qdir.entryInfoList(dirFilter)
561 if len(entryInfoList) > 0: 559 if len(entryInfoList) > 0:
562 if repopulate: 560 if repopulate:
563 self.beginInsertRows( 561 self.beginInsertRows(
564 self.createIndex(parentItem.row(), 0, parentItem), 562 self.createIndex(parentItem.row(), 0, parentItem),

eric ide

mercurial