eric7/Snapshot/SnapWidget.py

branch
eric7
changeset 8555
844c2713bf44
parent 8459
0ae07748dbe8
child 8637
394377638256
--- a/eric7/Snapshot/SnapWidget.py	Sun Aug 29 17:46:56 2021 +0200
+++ b/eric7/Snapshot/SnapWidget.py	Sun Aug 29 17:48:26 2021 +0200
@@ -17,7 +17,7 @@
 
 from PyQt6.QtCore import (
     pyqtSlot, Qt, QFile, QFileInfo, QTimer, QPoint, QMimeData, QLocale,
-    QStandardPaths
+    QStandardPaths, QIODevice
 )
 from PyQt6.QtGui import QImageWriter, QPixmap, QDrag, QKeySequence, QShortcut
 from PyQt6.QtWidgets import QWidget, QApplication
@@ -240,7 +240,7 @@
                 return False
         
         file = QFile(fileName)
-        if not file.open(QFile.WriteOnly):
+        if not file.open(QIODevice.OpenModeFlag.WriteOnly):
             EricMessageBox.warning(
                 self, self.tr("Save Snapshot"),
                 self.tr("Cannot write file '{0}:\n{1}.")

eric ide

mercurial