eric6/WebBrowser/Download/DownloadManager.py

changeset 8143
2c730d5fd177
parent 7955
567f2ec958c3
child 8217
385f60c94548
diff -r 27f636beebad -r 2c730d5fd177 eric6/WebBrowser/Download/DownloadManager.py
--- a/eric6/WebBrowser/Download/DownloadManager.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/WebBrowser/Download/DownloadManager.py	Tue Mar 02 17:17:09 2021 +0100
@@ -54,7 +54,7 @@
         """
         super(DownloadManager, self).__init__(parent)
         self.setupUi(self)
-        self.setWindowFlags(Qt.Window)
+        self.setWindowFlags(Qt.WindowType.Window)
         
         self.__winTaskbarButton = None
         
@@ -78,7 +78,8 @@
         self.downloadsView.setAlternatingRowColors(True)
         self.downloadsView.horizontalHeader().setStretchLastSection(True)
         self.downloadsView.setModel(self.__model)
-        self.downloadsView.setContextMenuPolicy(Qt.CustomContextMenu)
+        self.downloadsView.setContextMenuPolicy(
+            Qt.ContextMenuPolicy.CustomContextMenu)
         self.downloadsView.customContextMenuRequested.connect(
             self.__customContextMenuRequested)
         
@@ -318,7 +319,7 @@
         self.__model.endInsertRows()
         
         self.downloadsView.setIndexWidget(self.__model.index(row, 0), itm)
-        icon = self.style().standardIcon(QStyle.SP_FileIcon)
+        icon = self.style().standardIcon(QStyle.StandardPixmap.SP_FileIcon)
         itm.setIcon(icon)
         self.downloadsView.setRowHeight(
             row, itm.sizeHint().height() * self.__rowHeightMultiplier)
@@ -345,7 +346,7 @@
         
         icon = self.__iconProvider.icon(QFileInfo(itm.fileName()))
         if icon.isNull():
-            icon = self.style().standardIcon(QStyle.SP_FileIcon)
+            icon = self.style().standardIcon(QStyle.StandardPixmap.SP_FileIcon)
         itm.setIcon(icon)
         
         self.downloadsView.setRowHeight(
@@ -703,7 +704,8 @@
         """
         itm = self.__currentItem()
         if itm is not None:
-            url = itm.getPageUrl().toDisplayString(QUrl.FullyDecoded)
+            url = itm.getPageUrl().toDisplayString(
+                QUrl.ComponentFormattingOption.FullyDecoded)
             QApplication.clipboard().setText(url)
     
     def __contextMenuSelectAll(self):

eric ide

mercurial