summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebenginepage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.cpp')
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index fd1f5483..10e3dcda 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -42,6 +42,7 @@
#include <QMenu>
#include <QMessageBox>
#include <QStandardPaths>
+#include <QStyle>
#include <QUrl>
QT_BEGIN_NAMESPACE
@@ -162,12 +163,10 @@ void CallbackDirectory::CallbackSharedDataPointer::doDeref()
}
QWebEnginePagePrivate::QWebEnginePagePrivate()
- : QObjectPrivate(QObjectPrivateVersion)
- , adapter(new WebContentsAdapter)
+ : adapter(new WebContentsAdapter)
, history(new QWebEngineHistory(new QWebEngineHistoryPrivate(this)))
, view(0)
{
- adapter->initialize(this);
memset(actions, 0, sizeof(actions));
}
@@ -407,8 +406,12 @@ void QWebEnginePagePrivate::recreateFromSerializedHistory(QDataStream &input)
}
QWebEnginePage::QWebEnginePage(QObject* parent)
- : QObject(*new QWebEnginePagePrivate, parent)
+ : QObject(parent)
+ , d_ptr(new QWebEnginePagePrivate)
{
+ Q_D(QWebEnginePage);
+ d->q_ptr = this;
+ d->adapter->initialize(d);
}
QWebEnginePage::~QWebEnginePage()