Skip to content

Commit

Permalink
core: Enable HTML5 local storage (fixes #872)
Browse files Browse the repository at this point in the history
  • Loading branch information
trollixx committed Jan 20, 2018
1 parent 18de7a1 commit 9fdaa35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libs/core/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include "settings.h"

#include "filemanager.h"

#include <QCoreApplication>
#include <QDir>
#include <QSettings>
Expand Down Expand Up @@ -49,6 +51,11 @@ Settings::Settings(QObject *parent) :
{
qRegisterMetaTypeStreamOperators<ExternalLinkPolicy>("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();
}

Expand Down

0 comments on commit 9fdaa35

Please sign in to comment.