diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-10 10:06:39 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-10 10:06:39 +0200 |
commit | 0932a59971f606f07b41da19f3974d51b7008180 (patch) | |
tree | 191aab5e88e7b4ddf3724dcbf3b8229512e433f2 /src/quick/items/context2d/qquickcanvasitem.cpp | |
parent | aca40a8361996e22ec4f020b803404031a0f0d76 (diff) | |
parent | cd0efef04bd45eca6cc72b5a000e4e5586153290 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Part of 0e053528 was reverted in the merge, about lastTimestamp. It
will be applied later in separate commit.
qmltest::shadersource-dynamic-sourceobject::test_endresult() was
blacklisted on linux.
Conflicts:
.qmake.conf
tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
tests/auto/qmltest/BLACKLIST
tests/auto/qmltest/qmltest.pro
Task-number: QTBUG-53590
Task-number: QTBUG-53971
Change-Id: I48af90b49a3c7b29de16f4178a04807f8bc05130
Diffstat (limited to 'src/quick/items/context2d/qquickcanvasitem.cpp')
-rw-r--r-- | src/quick/items/context2d/qquickcanvasitem.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 4abcc722d1..b3b5144eb3 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -682,10 +682,14 @@ void QQuickCanvasItem::itemChange(QQuickItem::ItemChange change, const QQuickIte QSGRenderContext *context = QQuickWindowPrivate::get(d->window)->context; // Rendering to FramebufferObject needs a valid OpenGL context. - if (context != 0 && (d->renderTarget != FramebufferObject || context->isValid())) - sceneGraphInitialized(); - else + if (context != 0 && (d->renderTarget != FramebufferObject || context->isValid())) { + // Defer the call. In some (arguably incorrect) cases we get here due + // to ItemSceneChange with the user-supplied property values not yet + // set. Work this around by a deferred invoke. (QTBUG-49692) + QMetaObject::invokeMethod(this, "sceneGraphInitialized", Qt::QueuedConnection); + } else { connect(d->window, SIGNAL(sceneGraphInitialized()), SLOT(sceneGraphInitialized())); + } } void QQuickCanvasItem::updatePolish() |