Changed the obsoleted use of QDirModel to QFileSystemModel.

Thu, 25 Jul 2013 19:08:05 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 25 Jul 2013 19:08:05 +0200
changeset 2822
449de130268e
parent 2821
459cc954bea8
child 2824
858412c29c34

Changed the obsoleted use of QDirModel to QFileSystemModel.

E5Gui/E5Completers.py file | annotate | diff | comparison | revisions
--- 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