eric6/eric6_browser.py

changeset 8143
2c730d5fd177
parent 7960
e8fc383322f7
child 8228
772103b14c18
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
38 elif arg.startswith("--settings="): 38 elif arg.startswith("--settings="):
39 from PyQt5.QtCore import QSettings 39 from PyQt5.QtCore import QSettings
40 SettingsDir = os.path.expanduser(arg.replace("--settings=", "")) 40 SettingsDir = os.path.expanduser(arg.replace("--settings=", ""))
41 if not os.path.isdir(SettingsDir): 41 if not os.path.isdir(SettingsDir):
42 os.makedirs(SettingsDir) 42 os.makedirs(SettingsDir)
43 QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, 43 QSettings.setPath(
44 SettingsDir) 44 QSettings.Format.IniFormat, QSettings.Scope.UserScope, SettingsDir)
45 sys.argv.remove(arg) 45 sys.argv.remove(arg)
46 46
47 # make ThirdParty package available as a packages repository 47 # make ThirdParty package available as a packages repository
48 sys.path.insert(2, os.path.join(os.path.dirname(__file__), 48 sys.path.insert(2, os.path.join(os.path.dirname(__file__),
49 "ThirdParty", "Pygments")) 49 "ThirdParty", "Pygments"))
163 # set the library paths for plugins 163 # set the library paths for plugins
164 Startup.setLibraryPaths() 164 Startup.setLibraryPaths()
165 165
166 scheme = QWebEngineUrlScheme(b"eric") 166 scheme = QWebEngineUrlScheme(b"eric")
167 scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path) 167 scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path)
168 scheme.setFlags(QWebEngineUrlScheme.SecureScheme | 168 scheme.setFlags(QWebEngineUrlScheme.Flag.SecureScheme |
169 QWebEngineUrlScheme.ContentSecurityPolicyIgnored) 169 QWebEngineUrlScheme.Flag.ContentSecurityPolicyIgnored)
170 QWebEngineUrlScheme.registerScheme(scheme) 170 QWebEngineUrlScheme.registerScheme(scheme)
171 if "--qthelp" in sys.argv: 171 if "--qthelp" in sys.argv:
172 scheme = QWebEngineUrlScheme(b"qthelp") 172 scheme = QWebEngineUrlScheme(b"qthelp")
173 scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path) 173 scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path)
174 scheme.setFlags(QWebEngineUrlScheme.SecureScheme) 174 scheme.setFlags(QWebEngineUrlScheme.Flag.SecureScheme)
175 QWebEngineUrlScheme.registerScheme(scheme) 175 QWebEngineUrlScheme.registerScheme(scheme)
176 176
177 app = E5Application(sys.argv) 177 app = E5Application(sys.argv)
178 if "--private" not in sys.argv: 178 if "--private" not in sys.argv:
179 client = WebBrowserSingleApplicationClient() 179 client = WebBrowserSingleApplicationClient()

eric ide

mercurial