eric7/WebBrowser/PageScreenDialog.py

branch
eric7
changeset 9153
506e35e424d5
parent 8881
54e42bc2437a
child 9162
8b75b1668583
--- a/eric7/WebBrowser/PageScreenDialog.py	Thu Jun 16 18:28:59 2022 +0200
+++ b/eric7/WebBrowser/PageScreenDialog.py	Fri Jun 17 16:36:14 2022 +0200
@@ -7,7 +7,9 @@
 Module implementing a dialog to save a screenshot of a web page.
 """
 
-from PyQt6.QtCore import pyqtSlot, Qt, QFile, QFileInfo, QSize, QIODevice
+import pathlib
+
+from PyQt6.QtCore import pyqtSlot, Qt, QFile, QSize, QIODevice
 from PyQt6.QtGui import QImage, QPainter, QPixmap
 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QAbstractButton
 
@@ -75,7 +77,7 @@
         if not fileName:
             return False
         
-        if QFileInfo(fileName).exists():
+        if pathlib.Path(fileName).exists():
             res = EricMessageBox.yesNo(
                 self,
                 self.tr("Save Page Screen"),

eric ide

mercurial