eric6/WebBrowser/Tools/WebBrowserTools.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8221
0572a215bd2f
diff -r 27f636beebad -r 2c730d5fd177 eric6/WebBrowser/Tools/WebBrowserTools.py
--- a/eric6/WebBrowser/Tools/WebBrowserTools.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/WebBrowser/Tools/WebBrowserTools.py	Tue Mar 02 17:17:09 2021 +0100
@@ -107,8 +107,12 @@
     @param url URL (QUrl)
     @return file name (string)
     """
-    fileName = url.toString(QUrl.RemoveFragment | QUrl.RemoveQuery |
-                            QUrl.RemoveScheme | QUrl.RemovePort)
+    fileName = url.toString(
+        QUrl.UrlFormattingOption.RemoveFragment |
+        QUrl.UrlFormattingOption.RemoveQuery |
+        QUrl.UrlFormattingOption.RemoveScheme |
+        QUrl.UrlFormattingOption.RemovePort
+    )
     if fileName.find("/") != -1:
         pos = fileName.rfind("/")
         fileName = fileName[pos:]
@@ -171,7 +175,7 @@
     """
     byteArray = QByteArray()
     buffer = QBuffer(byteArray)
-    buffer.open(QIODevice.WriteOnly)
+    buffer.open(QIODevice.OpenModeFlag.WriteOnly)
     if pixmap.save(buffer, "PNG"):
         return buffer.buffer().toBase64()
     

eric ide

mercurial