summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@digia.com>2014-01-14 15:56:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-28 15:38:22 +0100
commit7753f12a5449a3ec934e833619380e91f97a6db1 (patch)
treec70a1bc3b5c649afad1c5dc0d2f642a32b22174b /src/webengine
parent14992ac7cf0754b8a97a8cedf40c2b63aa26d421 (diff)
Pre-start the render process upon initialiazing the adapter
This should provide us with an initial empty document, which our imported autotests tend to assume all over the place. Initialization of the adapter is moved further down in QQuickWebEngineView's constructor so that the value of q_ptr is set and valid by the time we end up in WebContentsViewQt::CreateViewForWidget. Change-Id: I45d8d61e65caa3a690461b6da44adea9f8981e7e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index a9970773..68e64ee4 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -89,8 +89,6 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
// 1x, 2x, 3x etc assets that fit an integral number of pixels.
setDevicePixelRatio(qMax(1, qRound(webPixelRatio)));
}
-
- adapter->initialize(this);
}
QQuickWebEngineViewExperimental *QQuickWebEngineViewPrivate::experimental() const
@@ -324,8 +322,9 @@ void QQuickWebEngineViewPrivate::setDevicePixelRatio(qreal devicePixelRatio)
QQuickWebEngineView::QQuickWebEngineView(QQuickItem *parent)
: QQuickItem(*(new QQuickWebEngineViewPrivate), parent)
{
- Q_D(const QQuickWebEngineView);
+ Q_D(QQuickWebEngineView);
d->e->q_ptr = this;
+ d->adapter->initialize(d);
}
QQuickWebEngineView::~QQuickWebEngineView()