Enable persistent webkit storage
This commit is contained in:
parent
851f473e0c
commit
c9f7d6771a
@ -125,7 +125,7 @@ class QuteBrowser(QApplication):
|
||||
# We didn't really initialize much so far, so we just quit hard.
|
||||
sys.exit(1)
|
||||
self.config = config.instance
|
||||
websettings.init()
|
||||
websettings.init(self._dirs.user_cache_dir)
|
||||
|
||||
self.commandmanager = CommandManager()
|
||||
self.searchmanager = SearchManager()
|
||||
|
@ -101,9 +101,14 @@ STATIC_SETTERS = {
|
||||
settings = None
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the global QWebSettings."""
|
||||
def init(cachedir):
|
||||
"""Initialize the global QWebSettings.
|
||||
|
||||
Args:
|
||||
cachedir: Directory to save cache files in.
|
||||
"""
|
||||
global settings
|
||||
QWebSettings.enablePersistentStorage(cachedir)
|
||||
settings = QWebSettings.globalSettings()
|
||||
for name, item in ATTRIBUTES.items():
|
||||
settings.setAttribute(item, config.get('webkit', name))
|
||||
|
Loading…
Reference in New Issue
Block a user