Pass arguments to websettings init functions

This commit is contained in:
Florian Bruhin 2016-11-23 07:57:35 +01:00
parent df5fdb9864
commit d99a7bd7ad
4 changed files with 7 additions and 7 deletions

View File

@ -405,7 +405,7 @@ def _init_modules(args, crash_handler):
sessions.init(qApp) sessions.init(qApp)
log.init.debug("Initializing websettings...") log.init.debug("Initializing websettings...")
websettings.init() websettings.init(args)
log.init.debug("Initializing adblock...") log.init.debug("Initializing adblock...")
host_blocker = adblock.HostBlocker() host_blocker = adblock.HostBlocker()

View File

@ -106,7 +106,7 @@ def update_settings(section, option):
_init_stylesheet(profile) _init_stylesheet(profile)
def init(): def init(_args):
"""Initialize the global QWebSettings.""" """Initialize the global QWebSettings."""
if config.get('general', 'developer-extras'): if config.get('general', 'developer-extras'):
# FIXME:qtwebengine Make sure we call globalSettings *after* this... # FIXME:qtwebengine Make sure we call globalSettings *after* this...

View File

@ -102,7 +102,7 @@ def update_settings(section, option):
websettings.update_mappings(MAPPINGS, section, option) websettings.update_mappings(MAPPINGS, section, option)
def init(): def init(_args):
"""Initialize the global QWebSettings.""" """Initialize the global QWebSettings."""
cache_path = standarddir.cache() cache_path = standarddir.cache()
data_path = standarddir.data() data_path = standarddir.data()

View File

@ -259,14 +259,14 @@ def update_mappings(mappings, section, option):
mapping.set(value) mapping.set(value)
def init(): def init(args):
"""Initialize all QWeb(Engine)Settings.""" """Initialize all QWeb(Engine)Settings."""
if objreg.get('args').backend == 'webengine': if args.backend == 'webengine':
from qutebrowser.browser.webengine import webenginesettings from qutebrowser.browser.webengine import webenginesettings
webenginesettings.init() webenginesettings.init(args)
else: else:
from qutebrowser.browser.webkit import webkitsettings from qutebrowser.browser.webkit import webkitsettings
webkitsettings.init() webkitsettings.init(args)
def shutdown(): def shutdown():