summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2022-09-27 10:26:35 +0200
committerSimon Rettberg2022-09-27 10:26:35 +0200
commit76b6e097304a2b44382e009d11fc7e7836f205f2 (patch)
treeb15b2f64419d923314668c62e0a979a123d2cba5
parentRemove javascript: prefix in onclick="" (diff)
downloadslxbrowser-76b6e097304a2b44382e009d11fc7e7836f205f2.tar.gz
slxbrowser-76b6e097304a2b44382e009d11fc7e7836f205f2.tar.xz
slxbrowser-76b6e097304a2b44382e009d11fc7e7836f205f2.zip
Enable local storage
-rw-r--r--src/slxbrowser.cpp1
-rw-r--r--src/webview.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/slxbrowser.cpp b/src/slxbrowser.cpp
index 9ea279e..f6d9850 100644
--- a/src/slxbrowser.cpp
+++ b/src/slxbrowser.cpp
@@ -27,6 +27,7 @@ SlxBrowser::SlxBrowser(BrowserSettings settings)
} else if (_settings.maximized) {
this->showMaximized();
}
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
//QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
QWidget *w = new QWidget;
QLayout *l = new QVBoxLayout;
diff --git a/src/webview.cpp b/src/webview.cpp
index 29afb19..bbed1cf 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -11,6 +11,7 @@ WebView::WebView(QWidget* parent)
_timer->setSingleShot(true);
connect(page(), SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
page()->setForwardUnsupportedContent(true);
+ page()->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
connect(page(), SIGNAL(unsupportedContent(QNetworkReply*)),this,SLOT(unsupportedContent(QNetworkReply*)));
connect(page(), SIGNAL(downloadRequested(QNetworkRequest)),this,SLOT(downloadRequest(QNetworkRequest)));
connect(_timer, SIGNAL(timeout()), this, SLOT(downloadDeniedMessage()));