Fixed an issue in the new EricDirFileDialog and implemented a workaround for a PyQt6 issue. eric7

Thu, 03 Jun 2021 17:53:10 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 03 Jun 2021 17:53:10 +0200
branch
eric7
changeset 8404
c455e281b193
parent 8403
d9fd02e8c28b
child 8405
9bd1be7ca2eb

Fixed an issue in the new EricDirFileDialog and implemented a workaround for a PyQt6 issue.

eric7/EricWidgets/EricDirFileDialog.py file | annotate | diff | comparison | revisions
--- a/eric7/EricWidgets/EricDirFileDialog.py	Thu Jun 03 15:58:59 2021 +0200
+++ b/eric7/EricWidgets/EricDirFileDialog.py	Thu Jun 03 17:53:10 2021 +0200
@@ -63,7 +63,9 @@
             return
         
         self.__selectedFilesFolders = [
-            x.data(QFileSystemModel.Roles.FilePathRole)
+            # TODO: re-enable once PyQt6 is fixed
+            #~ x.data(QFileSystemModel.Roles.FilePathRole)
+            x.data(QFileSystemModel.Roles.FilePathRole.value)
             for x in self.__tree.selectionModel().selectedIndexes()
             if x.column() == 0]
         
@@ -131,7 +133,7 @@
         @rtype list of str
         """
         if options is None:
-            options = QFileDialog.Options(0)
+            options = QFileDialog.Option(0)
         options |= QFileDialog.Option.DontUseNativeDialog
         dlg = EricDirFileDialog(parent, caption, directory, filterStr)
         dlg.setOptions(options)

eric ide

mercurial