diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-10-06 11:35:15 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-10-06 11:35:15 +0200 |
commit | ad14cfbf62ad22a555f440fe5d5228628423ff5d (patch) | |
tree | 1168236365003e2209e9f785d0bdfb07012c74aa /src/mainwindow.cpp | |
parent | Open bookmarks in new tabs (diff) | |
download | rekonq-ad14cfbf62ad22a555f440fe5d5228628423ff5d.tar.xz |
HTML5 offline storage cache support
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 60c4a05e..1d7cff9c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -463,10 +463,21 @@ void MainWindow::slotUpdateConfiguration() defaultSettings->setAttribute(QWebSettings::LinksIncludedInFocusChain, ReKonfig::linksIncludedInFocusChain()); defaultSettings->setAttribute(QWebSettings::ZoomTextOnly, ReKonfig::zoomTextOnly()); defaultSettings->setAttribute(QWebSettings::PrintElementBackgrounds, ReKonfig::printElementBackgrounds()); + + // ===== HTML 5 features WebKit support ====== defaultSettings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, ReKonfig::offlineStorageDatabaseEnabled()); defaultSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, ReKonfig::offlineWebApplicationCacheEnabled()); defaultSettings->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, ReKonfig::localStorageDatabaseEnabled()); - + if(ReKonfig::localStorageDatabaseEnabled()) + { + kDebug() << QWebSettings::offlineStoragePath(); + QString path = KStandardDirs::locateLocal("cache", QString("WebkitLocalStorage/rekonq"), true); + path.remove("rekonq"); + kDebug() << path; + QWebSettings::setOfflineStoragePath(path); + QWebSettings::setOfflineStorageDefaultQuota(50000); + } + // Applies user defined CSS to all open webpages. If there no longer is a // user defined CSS removes it from all open webpages. defaultSettings->setUserStyleSheetUrl(ReKonfig::userCSS()); |