From 9fdaa35420cb47141d519d872a4ad1ee75970756 Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Sun, 21 Jan 2018 01:56:50 +0200 Subject: [PATCH] core: Enable HTML5 local storage (fixes #872) --- src/libs/core/settings.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/core/settings.cpp b/src/libs/core/settings.cpp index a6145ec66..a92966615 100644 --- a/src/libs/core/settings.cpp +++ b/src/libs/core/settings.cpp @@ -22,6 +22,8 @@ #include "settings.h" +#include "filemanager.h" + #include #include #include @@ -49,6 +51,11 @@ Settings::Settings(QObject *parent) : { qRegisterMetaTypeStreamOperators("ExternalLinkPolicy"); + // Enable local storage due to https://github.com/zealdocs/zeal/issues/872. + QWebSettings *webSettings = QWebSettings::globalSettings(); + webSettings->setLocalStoragePath(FileManager::cacheLocation() + QLatin1String("/localStorage")); + webSettings->setAttribute(QWebSettings::LocalStorageEnabled, true); + load(); }