35 |
35 |
36 from Globals import qVersionTuple |
36 from Globals import qVersionTuple |
37 |
37 |
38 |
38 |
39 if qVersionTuple() < (5, 6, 0): |
39 if qVersionTuple() < (5, 6, 0): |
40 from PyQt5.QtCore import QTimer |
40 if "--quiet" not in sys.argv: |
41 from PyQt5.QtWidgets import QApplication |
41 from PyQt5.QtCore import QTimer |
42 from E5Gui import E5MessageBox |
42 from PyQt5.QtWidgets import QApplication |
43 app = QApplication([]) |
43 from E5Gui import E5MessageBox |
44 QTimer.singleShot(0, lambda: E5MessageBox.critical( |
44 app = QApplication([]) |
45 None, |
45 QTimer.singleShot(0, lambda: E5MessageBox.critical( |
46 "eric6 Web Browser", |
46 None, |
47 "You need at least Qt Version 5.6.0 to execute the web browser.") |
47 "eric6 Web Browser", |
48 ) |
48 "You need at least Qt Version 5.6.0 to execute the web browser.") |
49 app.exec_() |
49 ) |
|
50 app.exec_() |
50 sys.exit(100) |
51 sys.exit(100) |
51 |
52 |
52 SettingsDir = None |
53 SettingsDir = None |
53 |
54 |
54 for arg in sys.argv[:]: |
55 for arg in sys.argv[:]: |
73 "ThirdParty", "EditorConfig")) |
74 "ThirdParty", "EditorConfig")) |
74 |
75 |
75 try: |
76 try: |
76 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__ |
77 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__ |
77 except ImportError: |
78 except ImportError: |
78 from PyQt5.QtCore import QTimer |
79 if "--quiet" not in sys.argv: |
79 from PyQt5.QtWidgets import QApplication |
80 from PyQt5.QtCore import QTimer |
80 from E5Gui import E5MessageBox # __IGNORE_WARNING__ |
81 from PyQt5.QtWidgets import QApplication |
81 app = QApplication([]) |
82 from E5Gui import E5MessageBox # __IGNORE_WARNING__ |
82 QTimer.singleShot(0, lambda: E5MessageBox.critical( |
83 app = QApplication([]) |
83 None, |
84 QTimer.singleShot(0, lambda: E5MessageBox.critical( |
84 "eric6 Web Browser", |
85 None, |
85 "QtWebEngineWidgets is not installed but needed to execute the" |
86 "eric6 Web Browser", |
86 " web browser.")) |
87 "QtWebEngineWidgets is not installed but needed to execute the" |
87 app.exec_() |
88 " web browser.")) |
|
89 app.exec_() |
88 sys.exit(100) |
90 sys.exit(100) |
89 |
91 |
90 import Globals |
92 import Globals |
91 from Globals import AppInfo |
93 from Globals import AppInfo |
92 |
94 |
154 options = [ |
159 options = [ |
155 ("--config=configDir", |
160 ("--config=configDir", |
156 "use the given directory as the one containing the config files"), |
161 "use the given directory as the one containing the config files"), |
157 ("--private", "start the browser in private browsing mode"), |
162 ("--private", "start the browser in private browsing mode"), |
158 ("--qthelp", "start the browser with support for QtHelp"), |
163 ("--qthelp", "start the browser with support for QtHelp"), |
|
164 ("--quiet", "don't show any startup error messages"), |
159 ("--search=word", "search for the given word"), |
165 ("--search=word", "search for the given word"), |
160 ("--settings=settingsDir", |
166 ("--settings=settingsDir", |
161 "use the given directory to store the settings files"), |
167 "use the given directory to store the settings files"), |
162 ("--single", "start the browser as a single application"), |
168 ("--single", "start the browser as a single application"), |
163 ] |
169 ] |