Don't access QWES.globalSettings() on module-level
Otherwise we implicitly create a webengine context, which means setting QTWEBENGINE_REMOTE_DEBUGGING won't work anymore.
This commit is contained in:
parent
614893bdd6
commit
61e0c8327a
@ -36,23 +36,23 @@ from qutebrowser.utils import objreg, utils
|
||||
|
||||
class Attribute(websettings.Attribute):
|
||||
|
||||
GLOBAL_SETTINGS = QWebEngineSettings.globalSettings()
|
||||
GLOBAL_SETTINGS = QWebEngineSettings.globalSettings
|
||||
ENUM_BASE = QWebEngineSettings
|
||||
|
||||
|
||||
class Setter(websettings.Setter):
|
||||
|
||||
GLOBAL_SETTINGS = QWebEngineSettings.globalSettings()
|
||||
GLOBAL_SETTINGS = QWebEngineSettings.globalSettings
|
||||
|
||||
|
||||
class NullStringSetter(websettings.NullStringSetter):
|
||||
|
||||
GLOBAL_SETTINGS = QWebEngineSettings.globalSettings()
|
||||
GLOBAL_SETTINGS = QWebEngineSettings.globalSettings
|
||||
|
||||
|
||||
class StaticSetter(websettings.StaticSetter):
|
||||
|
||||
GLOBAL_SETTINGS = QWebEngineSettings.globalSettings()
|
||||
GLOBAL_SETTINGS = QWebEngineSettings.globalSettings
|
||||
|
||||
|
||||
def update_settings(section, option):
|
||||
|
@ -34,23 +34,23 @@ from qutebrowser.utils import standarddir, objreg
|
||||
|
||||
class Attribute(websettings.Attribute):
|
||||
|
||||
GLOBAL_SETTINGS = QWebSettings.globalSettings()
|
||||
GLOBAL_SETTINGS = QWebSettings.globalSettings
|
||||
ENUM_BASE = QWebSettings
|
||||
|
||||
|
||||
class Setter(websettings.Setter):
|
||||
|
||||
GLOBAL_SETTINGS = QWebSettings.globalSettings()
|
||||
GLOBAL_SETTINGS = QWebSettings.globalSettings
|
||||
|
||||
|
||||
class NullStringSetter(websettings.NullStringSetter):
|
||||
|
||||
GLOBAL_SETTINGS = QWebSettings.globalSettings()
|
||||
GLOBAL_SETTINGS = QWebSettings.globalSettings
|
||||
|
||||
|
||||
class StaticSetter(websettings.StaticSetter):
|
||||
|
||||
GLOBAL_SETTINGS = QWebSettings.globalSettings()
|
||||
GLOBAL_SETTINGS = QWebSettings.globalSettings
|
||||
|
||||
|
||||
class CookiePolicy(websettings.Base):
|
||||
|
@ -48,7 +48,7 @@ class Base:
|
||||
the global instance.
|
||||
"""
|
||||
if settings is None:
|
||||
return self.GLOBAL_SETTINGS
|
||||
return self.GLOBAL_SETTINGS()
|
||||
else:
|
||||
return settings
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user