7#include "templatewebenginepage.h"
8#include <QWebEngineProfile>
9#include <QWebEngineSettings>
11using namespace TemplateParser;
13TemplateWebEnginePage::TemplateWebEnginePage(
QObject *parent)
14 : QWebEnginePage(parent)
16 settings()->setAttribute(QWebEngineSettings::JavascriptEnabled,
false);
17 settings()->setAttribute(QWebEngineSettings::PluginsEnabled,
false);
18 settings()->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows,
false);
19 settings()->setAttribute(QWebEngineSettings::JavascriptCanAccessClipboard,
false);
20 settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled,
false);
21 settings()->setAttribute(QWebEngineSettings::XSSAuditingEnabled,
false);
22 settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled,
false);
23 settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls,
false);
26 settings()->setAttribute(QWebEngineSettings::HyperlinkAuditingEnabled,
false);
27 settings()->setAttribute(QWebEngineSettings::FullScreenSupportEnabled,
false);
28 settings()->setAttribute(QWebEngineSettings::ScreenCaptureEnabled,
false);
29 settings()->setAttribute(QWebEngineSettings::WebGLEnabled,
false);
30 settings()->setAttribute(QWebEngineSettings::AutoLoadIconsForPage,
false);
31 settings()->setAttribute(QWebEngineSettings::Accelerated2dCanvasEnabled,
false);
32 settings()->setAttribute(QWebEngineSettings::WebGLEnabled,
false);
34 settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled,
false);
35 settings()->setAttribute(QWebEngineSettings::AllowRunningInsecureContent,
false);
36 settings()->setAttribute(QWebEngineSettings::PdfViewerEnabled,
false);
37 settings()->setAttribute(QWebEngineSettings::NavigateOnDropEnabled,
false);
38 profile()->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies);
39 profile()->setHttpCacheType(QWebEngineProfile::MemoryHttpCache);
42TemplateWebEnginePage::~TemplateWebEnginePage() =
default;
44#include "moc_templatewebenginepage.cpp"