Update icon db path when private-browsing changed.

This commit is contained in:
Florian Bruhin 2015-03-18 20:20:04 +01:00
parent 706cc1a87f
commit c83775cf29

View File

@ -394,9 +394,15 @@ def init():
def update_settings(section, option):
"""Update global settings when qwebsettings changed."""
try:
mapping = MAPPINGS[section][option]
except KeyError:
return
value = config.get(section, option)
mapping.set(value)
if (section, option) == ('general', 'private-browsing'):
if config.get('general', 'private-browsing'):
QWebSettings.setIconDatabasePath('')
else:
QWebSettings.setIconDatabasePath(standarddir.cache())
else:
try:
mapping = MAPPINGS[section][option]
except KeyError:
return
value = config.get(section, option)
mapping.set(value)