Stop the icon database from being created when private-browsing is set to true

This commit is contained in:
binix 2015-01-08 17:09:55 +00:00
parent 77df4c7241
commit 8c7a7aaf20

View File

@ -195,7 +195,10 @@ def _set_setting(typ, arg, default=UNSET, value=UNSET):
def init():
"""Initialize the global QWebSettings."""
cachedir = standarddir.get(QStandardPaths.CacheLocation)
QWebSettings.setIconDatabasePath(cachedir)
if config.get('general', 'private-browsing'):
QWebSettings.setIconDatabasePath('')
else:
QWebSettings.setIconDatabasePath(cachedir)
QWebSettings.setOfflineWebApplicationCachePath(
os.path.join(cachedir, 'application-cache'))
datadir = standarddir.get(QStandardPaths.DataLocation)