eric6/WebBrowser/Download/DownloadModel.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
--- a/eric6/WebBrowser/Download/DownloadModel.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/WebBrowser/Download/DownloadModel.py	Tue Mar 02 17:17:09 2021 +0100
@@ -41,7 +41,7 @@
         if index.row() < 0 or index.row() >= self.rowCount(index.parent()):
             return None
         
-        if role == Qt.ToolTipRole:
+        if role == Qt.ItemDataRole.ToolTipRole:
             if (
                 self.__manager.downloads()[index.row()]
                 .downloadedSuccessfully()
@@ -108,13 +108,13 @@
         @rtype Qt.ItemFlags
         """
         if index.row() < 0 or index.row() >= self.rowCount(index.parent()):
-            return Qt.NoItemFlags
+            return Qt.ItemFlag.NoItemFlags
         
         defaultFlags = QAbstractListModel.flags(self, index)
         
         itm = self.__manager.downloads()[index.row()]
         if itm.downloadedSuccessfully():
-            return defaultFlags | Qt.ItemIsDragEnabled
+            return defaultFlags | Qt.ItemFlag.ItemIsDragEnabled
         
         return defaultFlags
     

eric ide

mercurial