From ad14cfbf62ad22a555f440fe5d5228628423ff5d Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 6 Oct 2009 11:35:15 +0200 Subject: HTML5 offline storage cache support --- src/mainwindow.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') 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()); -- cgit v1.2.1