E5Gui/E5Completers.py

changeset 2822
449de130268e
parent 2820
642c1f3c23c8
child 2847
1843ef6e2656
child 2990
583beaf0b4b8
diff -r 459cc954bea8 -r 449de130268e E5Gui/E5Completers.py
--- a/E5Gui/E5Completers.py	Thu Jul 25 19:05:41 2013 +0200
+++ b/E5Gui/E5Completers.py	Thu Jul 25 19:08:05 2013 +0200
@@ -8,11 +8,10 @@
 """
 
 from PyQt4.QtCore import QDir, Qt
-from PyQt4.QtGui import QCompleter, QDirModel, QStringListModel
+from PyQt4.QtGui import QCompleter, QFileSystemModel, QStringListModel
 
 from Globals import isWindowsPlatform
 
-# TODO: replace obsoleted QDirModel by QFileSystemModel
 
 class E5FileCompleter(QCompleter):
     """
@@ -30,7 +29,7 @@
         @keyparam showHidden flag indicating to show hidden entries as well (boolean)
         """
         super().__init__(parent)
-        self.__model = QDirModel(self)
+        self.__model = QFileSystemModel(self)
         if showHidden:
             self.__model.setFilter(
                 QDir.Filters(QDir.Dirs | QDir.Files | QDir.Drives | \
@@ -62,7 +61,7 @@
         @keyparam showHidden flag indicating to show hidden entries as well (boolean)
         """
         super().__init__(parent)
-        self.__model = QDirModel(self)
+        self.__model = QFileSystemModel(self)
         if showHidden:
             self.__model.setFilter(
                 QDir.Filters(QDir.Drives | QDir.AllDirs | QDir.Hidden))

eric ide

mercurial