summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/api/qquickwebengineview.cpp')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 352c3dcf..e9c5232a 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -52,6 +52,8 @@
#include "ui_delegates_manager.h"
#include "web_contents_adapter.h"
#include "web_engine_error.h"
+#include "web_engine_settings.h"
+#include "web_engine_visited_links_manager.h"
#include <QGuiApplication>
#include <QQmlComponent>
@@ -396,6 +398,30 @@ QObject *QQuickWebEngineViewPrivate::accessibilityParentObject()
return q;
}
+namespace {
+class DummySettingsDelegate : public WebEngineSettingsDelegate {
+public:
+ DummySettingsDelegate()
+ : settings(0) {}
+ void apply() { }
+ WebEngineSettings* fallbackSettings() const { return settings; }
+ WebEngineSettings *settings;
+};
+
+}// anonymous namespace
+
+WebEngineSettings *QQuickWebEngineViewPrivate::webEngineSettings() const
+{
+ static WebEngineSettings *dummySettings = 0;
+ if (!dummySettings) {
+ DummySettingsDelegate *dummyDelegate = new DummySettingsDelegate;
+ dummySettings = new WebEngineSettings(dummyDelegate);
+ dummyDelegate->settings = dummySettings;
+ dummySettings->initDefaults();
+ }
+ return dummySettings;
+}
+
void QQuickWebEngineViewPrivate::setDevicePixelRatio(qreal devicePixelRatio)
{
Q_Q(QQuickWebEngineView);