src/eric7/eric7_browser.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9412:45e7bb09c120 9413:80c06d472826
13 """ 13 """
14 14
15 import sys 15 import sys
16 import os 16 import os
17 17
18 sys.path.insert(1, os.path.dirname(__file__))
19
20 app = None 18 app = None
21 SettingsDir = None 19 SettingsDir = None
22 20
21 from eric7 import Globals
22
23 for arg in sys.argv[:]: 23 for arg in sys.argv[:]:
24 if arg.startswith("--config="): 24 if arg.startswith("--config="):
25 import Globals
26 25
27 configDir = arg.replace("--config=", "") 26 configDir = arg.replace("--config=", "")
28 Globals.setConfigDir(configDir) 27 Globals.setConfigDir(configDir)
29 sys.argv.remove(arg) 28 sys.argv.remove(arg)
30 elif arg.startswith("--settings="): 29 elif arg.startswith("--settings="):
42 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ 41 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__
43 except ImportError: 42 except ImportError:
44 if "--quiet" not in sys.argv: 43 if "--quiet" not in sys.argv:
45 from PyQt6.QtCore import QTimer 44 from PyQt6.QtCore import QTimer
46 from PyQt6.QtWidgets import QApplication 45 from PyQt6.QtWidgets import QApplication
47 from EricWidgets import EricMessageBox # __IGNORE_WARNING__ 46 from eric7.EricWidgets import EricMessageBox # __IGNORE_WARNING__
48 47
49 app = QApplication([]) 48 app = QApplication([])
50 QTimer.singleShot( 49 QTimer.singleShot(
51 0, 50 0,
52 lambda: EricMessageBox.critical( 51 lambda: EricMessageBox.critical(
59 app.exec() 58 app.exec()
60 sys.exit(100) 59 sys.exit(100)
61 60
62 from PyQt6.QtWebEngineCore import QWebEngineUrlScheme 61 from PyQt6.QtWebEngineCore import QWebEngineUrlScheme
63 62
64 import Globals 63 from eric7.Globals import AppInfo
65 from Globals import AppInfo
66 64
67 from EricWidgets.EricApplication import EricApplication 65 from eric7.EricWidgets.EricApplication import EricApplication
68 66
69 from Toolbox import Startup 67 from eric7.Toolbox import Startup
70 68
71 from WebBrowser.WebBrowserSingleApplication import WebBrowserSingleApplicationClient 69 from eric7.WebBrowser.WebBrowserSingleApplication import (
70 WebBrowserSingleApplicationClient,
71 )
72 72
73 73
74 def createMainWidget(argv): 74 def createMainWidget(argv):
75 """ 75 """
76 Function to create the main widget. 76 Function to create the main widget.
78 @param argv list of command line parameters 78 @param argv list of command line parameters
79 @type list of str 79 @type list of str
80 @return reference to the main widget 80 @return reference to the main widget
81 @rtype QWidget 81 @rtype QWidget
82 """ 82 """
83 from WebBrowser.WebBrowserWindow import WebBrowserWindow 83 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow
84 84
85 searchWord = None 85 searchWord = None
86 private = False 86 private = False
87 qthelp = False 87 qthelp = False
88 single = False 88 single = False

eric ide

mercurial