summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-30 05:16:16 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-30 05:16:42 (GMT)
commit923fe09eb7aa0a46c3ac6a8de76c9c5316fbb930 (patch)
tree225d0cd05366ea9bcb8b7be8977fa2f53426e66e
parent98c3d5326a510dfd5ddc10f2ff95b1bf690342e2 (diff)
Disable some features here too
-rw-r--r--src/ksieveui/editor/webengine/sieveeditorwebengineview.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ksieveui/editor/webengine/sieveeditorwebengineview.cpp b/src/ksieveui/editor/webengine/sieveeditorwebengineview.cpp
index 119fad2..58d4ea0 100644
--- a/src/ksieveui/editor/webengine/sieveeditorwebengineview.cpp
+++ b/src/ksieveui/editor/webengine/sieveeditorwebengineview.cpp
@@ -22,6 +22,7 @@
#include <QFileDialog>
#include <QWebEngineDownloadItem>
#include <QWebEngineProfile>
+#include <QWebEngineSettings>
using namespace KSieveUi;
@@ -31,6 +32,17 @@ SieveEditorWebEngineView::SieveEditorWebEngineView(QWidget *parent)
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
QWebEngineProfile *profile = new QWebEngineProfile(this);
QWebEnginePage *page = new QWebEnginePage(profile, this);
+ page->settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, false);
+ page->settings()->setAttribute(QWebEngineSettings::PluginsEnabled, false);
+ page->settings()->setAttribute(QWebEngineSettings::AutoLoadImages, false);
+ page->settings()->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows, false);
+ page->settings()->setAttribute(QWebEngineSettings::JavascriptCanAccessClipboard, false);
+ page->settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, false);
+ page->settings()->setAttribute(QWebEngineSettings::XSSAuditingEnabled, false);
+ page->settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false);
+ page->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, false);
+ page->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessFileUrls, false);
+
setPage(page);
connect(profile, &QWebEngineProfile::downloadRequested, this, &SieveEditorWebEngineView::downloadRequested);
#endif