eric6/eric6_browser.py

changeset 7316
abe6dd39e4ee
parent 7257
c4d0cac9b5c9
child 7360
9190402e4505
equal deleted inserted replaced
7315:41fdf2cd1c33 7316:abe6dd39e4ee
18 18
19 sys.path.insert(1, os.path.dirname(__file__)) 19 sys.path.insert(1, os.path.dirname(__file__))
20 20
21 try: 21 try:
22 try: 22 try:
23 from PyQt5 import sip 23 from PyQt5 import sip # __IGNORE_EXCEPTION__
24 except ImportError: 24 except ImportError:
25 import sip 25 import sip
26 sip.setdestroyonexit(False) 26 sip.setdestroyonexit(False)
27 except AttributeError: 27 except AttributeError:
28 pass 28 pass
66 " web browser.")) 66 " web browser."))
67 app.exec_() 67 app.exec_()
68 sys.exit(100) 68 sys.exit(100)
69 69
70 import Globals 70 import Globals
71 from Globals import AppInfo 71 from Globals import AppInfo, qVersionTuple
72 72
73 from E5Gui.E5Application import E5Application 73 from E5Gui.E5Application import E5Application
74 74
75 from Toolbox import Startup 75 from Toolbox import Startup
76 76
157 options) 157 options)
158 158
159 # set the library paths for plugins 159 # set the library paths for plugins
160 Startup.setLibraryPaths() 160 Startup.setLibraryPaths()
161 161
162 if qVersionTuple() >= (5, 12, 0):
163 from PyQt5.QtWebEngineCore import QWebEngineUrlScheme
164 scheme = QWebEngineUrlScheme(b"eric")
165 scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path)
166 scheme.setFlags(QWebEngineUrlScheme.SecureScheme |
167 QWebEngineUrlScheme.ContentSecurityPolicyIgnored)
168 QWebEngineUrlScheme.registerScheme(scheme)
169 if "--qthelp" in sys.argv and qVersionTuple() >= (5, 12, 0):
170 from PyQt5.QtWebEngineCore import QWebEngineUrlScheme
171 scheme = QWebEngineUrlScheme(b"qthelp")
172 scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path)
173 scheme.setFlags(QWebEngineUrlScheme.SecureScheme)
174 QWebEngineUrlScheme.registerScheme(scheme)
175
162 app = E5Application(sys.argv) 176 app = E5Application(sys.argv)
163 if "--private" not in sys.argv: 177 if "--private" not in sys.argv:
164 client = WebBrowserSingleApplicationClient() 178 client = WebBrowserSingleApplicationClient()
165 res = client.connect() 179 res = client.connect()
166 if res > 0: 180 if res > 0:

eric ide

mercurial