summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-06 11:35:15 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-06 11:35:15 +0200
commitad14cfbf62ad22a555f440fe5d5228628423ff5d (patch)
tree1168236365003e2209e9f785d0bdfb07012c74aa /src/mainwindow.cpp
parentOpen bookmarks in new tabs (diff)
downloadrekonq-ad14cfbf62ad22a555f440fe5d5228628423ff5d.tar.xz
HTML5 offline storage cache support
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp13
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());