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.
|
# We didn't really initialize much so far, so we just quit hard.
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
self.config = config.instance
|
self.config = config.instance
|
||||||
websettings.init()
|
websettings.init(self._dirs.user_cache_dir)
|
||||||
|
|
||||||
self.commandmanager = CommandManager()
|
self.commandmanager = CommandManager()
|
||||||
self.searchmanager = SearchManager()
|
self.searchmanager = SearchManager()
|
||||||
|
@ -101,9 +101,14 @@ STATIC_SETTERS = {
|
|||||||
settings = None
|
settings = None
|
||||||
|
|
||||||
|
|
||||||
def init():
|
def init(cachedir):
|
||||||
"""Initialize the global QWebSettings."""
|
"""Initialize the global QWebSettings.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
cachedir: Directory to save cache files in.
|
||||||
|
"""
|
||||||
global settings
|
global settings
|
||||||
|
QWebSettings.enablePersistentStorage(cachedir)
|
||||||
settings = QWebSettings.globalSettings()
|
settings = QWebSettings.globalSettings()
|
||||||
for name, item in ATTRIBUTES.items():
|
for name, item in ATTRIBUTES.items():
|
||||||
settings.setAttribute(item, config.get('webkit', name))
|
settings.setAttribute(item, config.get('webkit', name))
|
||||||
|
Loading…
Reference in New Issue
Block a user