eric7/Tools/TrayStarter.py

branch
eric7
changeset 9152
8a68afaf1ba2
parent 9066
a219ade50f7c
child 9167
2d2b9a26e904
--- a/eric7/Tools/TrayStarter.py	Wed Jun 15 09:44:07 2022 +0200
+++ b/eric7/Tools/TrayStarter.py	Thu Jun 16 18:28:59 2022 +0200
@@ -9,9 +9,10 @@
 
 import sys
 import os
+import pathlib
 import contextlib
 
-from PyQt6.QtCore import QProcess, QSettings, QFileInfo
+from PyQt6.QtCore import QProcess, QSettings
 from PyQt6.QtGui import QCursor
 from PyQt6.QtWidgets import QSystemTrayIcon, QMenu, QDialog, QApplication
 
@@ -206,7 +207,7 @@
         rp = self.rsettings.value(Globals.recentNameProject)
         if rp is not None:
             for f in rp:
-                if QFileInfo(f).exists():
+                if pathlib.Path(f).exists():
                     self.recentProjects.append(f)
     
     def __loadRecentMultiProjects(self):
@@ -216,7 +217,7 @@
         rmp = self.rsettings.value(Globals.recentNameMultiProject)
         if rmp is not None:
             for f in rmp:
-                if QFileInfo(f).exists():
+                if pathlib.Path(f).exists():
                     self.recentMultiProjects.append(f)
     
     def __loadRecentFiles(self):
@@ -226,7 +227,7 @@
         rf = self.rsettings.value(Globals.recentNameFiles)
         if rf is not None:
             for f in rf:
-                if QFileInfo(f).exists():
+                if pathlib.Path(f).exists():
                     self.recentFiles.append(f)
     
     def __activated(self, reason):

eric ide

mercurial