src/eric7/WebBrowser/WebBrowserWindow.py

branch
eric7
changeset 9624
b47dfa7a137d
parent 9576
be9f8e7e42e0
child 9653
e67609152c5e
--- a/src/eric7/WebBrowser/WebBrowserWindow.py	Sun Dec 18 14:19:10 2022 +0100
+++ b/src/eric7/WebBrowser/WebBrowserWindow.py	Sun Dec 18 19:33:46 2022 +0100
@@ -68,6 +68,7 @@
 from eric7.Globals import getConfig
 from eric7.Preferences import Shortcuts
 from eric7.Preferences.ShortcutsDialog import ShortcutsDialog
+from eric7.SystemUtilities import FileSystemUtilities, OSUtilities, PythonUtilities
 from eric7.UI import Config
 from eric7.UI.Info import Version
 from eric7.UI.NotificationWidget import NotificationTypes
@@ -521,7 +522,7 @@
         """
         if enable:
             iconDatabasePath = os.path.join(
-                Utilities.getConfigDir(), "web_browser", "favicons"
+                Globals.getConfigDir(), "web_browser", "favicons"
             )
             if not os.path.exists(iconDatabasePath):
                 os.makedirs(iconDatabasePath)
@@ -1500,7 +1501,7 @@
             self,
             "webbrowser_view_full_screen",
         )
-        if Globals.isMacPlatform():
+        if OSUtilities.isMacPlatform():
             self.fullScreenAct.setShortcut(QKeySequence(self.tr("Meta+Ctrl+F")))
         else:
             self.fullScreenAct.setShortcut(QKeySequence(self.tr("F11")))
@@ -2855,7 +2856,7 @@
         applPath = os.path.join(getConfig("ericDir"), "eric7_browser.py")
         args = []
         args.append(applPath)
-        args.append("--config={0}".format(Utilities.getConfigDir()))
+        args.append("--config={0}".format(Globals.getConfigDir()))
         if self.__settingsDir:
             args.append("--settings={0}".format(self.__settingsDir))
         args.append("--private")
@@ -2863,7 +2864,7 @@
             args.append(linkName)
 
         if not os.path.isfile(applPath) or not QProcess.startDetached(
-            Globals.getPythonExecutable(), args
+            PythonUtilities.getPythonExecutable(), args
         ):
             EricMessageBox.critical(
                 self,
@@ -2892,8 +2893,8 @@
             ),
         )
         if fn:
-            if Utilities.isWindowsPlatform():
-                url = "file:///" + Utilities.fromNativeSeparators(fn)
+            if OSUtilities.isWindowsPlatform():
+                url = "file:///" + FileSystemUtilities.fromNativeSeparators(fn)
             else:
                 url = "file://" + fn
             self.currentBrowser().setSource(QUrl(url))
@@ -2915,8 +2916,8 @@
             ),
         )
         if fn:
-            if Utilities.isWindowsPlatform():
-                url = "file:///" + Utilities.fromNativeSeparators(fn)
+            if OSUtilities.isWindowsPlatform():
+                url = "file:///" + FileSystemUtilities.fromNativeSeparators(fn)
             else:
                 url = "file://" + fn
             self.newTab(url)
@@ -3786,7 +3787,7 @@
         @return path of the QtHelp collection file
         @rtype str
         """
-        qthelpDir = os.path.join(Utilities.getConfigDir(), "qthelp")
+        qthelpDir = os.path.join(Globals.getConfigDir(), "qthelp")
         if not os.path.exists(qthelpDir):
             os.makedirs(qthelpDir)
         return os.path.join(qthelpDir, "eric7help.qhc")
@@ -5292,7 +5293,7 @@
                         Preferences.getWebBrowser("DiskCacheSize") * 1024 * 1024
                     )
                     cls._webProfile.setCachePath(
-                        os.path.join(Utilities.getConfigDir(), "web_browser")
+                        os.path.join(Globals.getConfigDir(), "web_browser")
                     )
                 else:
                     cls._webProfile.setHttpCacheType(
@@ -5301,7 +5302,7 @@
                     cls._webProfile.setHttpCacheMaximumSize(0)
                 cls._webProfile.setPersistentStoragePath(
                     os.path.join(
-                        Utilities.getConfigDir(), "web_browser", "persistentstorage"
+                        Globals.getConfigDir(), "web_browser", "persistentstorage"
                     )
                 )
                 cls._webProfile.setPersistentCookiesPolicy(

eric ide

mercurial