39 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ |
39 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ |
40 except ImportError: |
40 except ImportError: |
41 if "--quiet" not in sys.argv: |
41 if "--quiet" not in sys.argv: |
42 from PyQt6.QtCore import QTimer |
42 from PyQt6.QtCore import QTimer |
43 from PyQt6.QtWidgets import QApplication |
43 from PyQt6.QtWidgets import QApplication |
44 from E5Gui import E5MessageBox # __IGNORE_WARNING__ |
44 from E5Gui import EricMessageBox # __IGNORE_WARNING__ |
45 app = QApplication([]) |
45 app = QApplication([]) |
46 QTimer.singleShot(0, lambda: E5MessageBox.critical( |
46 QTimer.singleShot(0, lambda: EricMessageBox.critical( |
47 None, |
47 None, |
48 "eric Web Browser", |
48 "eric Web Browser", |
49 "QtWebEngineWidgets is not installed but needed to execute the" |
49 "QtWebEngineWidgets is not installed but needed to execute the" |
50 " web browser.")) |
50 " web browser.")) |
51 app.exec() |
51 app.exec() |
54 from PyQt6.QtWebEngineCore import QWebEngineUrlScheme |
54 from PyQt6.QtWebEngineCore import QWebEngineUrlScheme |
55 |
55 |
56 import Globals |
56 import Globals |
57 from Globals import AppInfo |
57 from Globals import AppInfo |
58 |
58 |
59 from E5Gui.E5Application import E5Application |
59 from E5Gui.EricApplication import EricApplication |
60 |
60 |
61 from Toolbox import Startup |
61 from Toolbox import Startup |
62 |
62 |
63 from WebBrowser.WebBrowserSingleApplication import ( |
63 from WebBrowser.WebBrowserSingleApplication import ( |
64 WebBrowserSingleApplicationClient |
64 WebBrowserSingleApplicationClient |
155 scheme = QWebEngineUrlScheme(b"qthelp") |
155 scheme = QWebEngineUrlScheme(b"qthelp") |
156 scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path) |
156 scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path) |
157 scheme.setFlags(QWebEngineUrlScheme.Flag.SecureScheme) |
157 scheme.setFlags(QWebEngineUrlScheme.Flag.SecureScheme) |
158 QWebEngineUrlScheme.registerScheme(scheme) |
158 QWebEngineUrlScheme.registerScheme(scheme) |
159 |
159 |
160 app = E5Application(sys.argv) |
160 app = EricApplication(sys.argv) |
161 if "--private" not in sys.argv: |
161 if "--private" not in sys.argv: |
162 client = WebBrowserSingleApplicationClient() |
162 client = WebBrowserSingleApplicationClient() |
163 res = client.connect() |
163 res = client.connect() |
164 if res > 0: |
164 if res > 0: |
165 if len(sys.argv) > 1: |
165 if len(sys.argv) > 1: |