diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2012-01-06 10:57:12 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-09 23:26:06 +0100 |
commit | 627bcb8a88f6c1be73b0bbd45f9488b37fd40e83 (patch) | |
tree | 8e254f2bec7c5723a5fc5deb938d521c823b5756 /tests | |
parent | 97bc83ace2439eaf0cb7150338a4d8c92702adaa (diff) |
Fix tst_qdeclarativestates::anchorsRewindBug failure
maybeUpdate() has an optimization to void locking the Gui thread
on every QQuickItem::update() call, which was faulty. When the
render thread was done rendering the flag should have been reset
which would have meant another locked sync between render and GUI.
Solve it slightly differently by posting an event to ourselves in GUI
and resetting the state once the event is processed. This batches all
update calls made until the GUI thread returns to the event loop, aka
all animation updates, all responds to one touch event, etc.
The isExternalUpdatePending variable, written from maybeUpdate, was
accumulated per canvas, but is used per render thread only, so this
change simplifies the variable to be per render thread only.
Task-number: QTBUG-23478
Change-Id: I067a9918383e3e05e2feebcc6dfa3163b032eb5b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qtquick2/qdeclarativestates/tst_qdeclarativestates.cpp | 3 | ||||
-rw-r--r-- | tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp | 3 |
2 files changed, 0 insertions, 6 deletions
diff --git a/tests/auto/qtquick2/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/qtquick2/qdeclarativestates/tst_qdeclarativestates.cpp index df0c2f2dfd..4d5df12e0b 100644 --- a/tests/auto/qtquick2/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/qtquick2/qdeclarativestates/tst_qdeclarativestates.cpp @@ -1001,9 +1001,6 @@ void tst_qdeclarativestates::anchorRewindBug() // and column's implicit resizing should still work QVERIFY(!QQuickItemPrivate::get(column)->heightValid); QVERIFY(!QQuickItemPrivate::get(column)->widthValid); -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-23478", Abort); -#endif QTRY_COMPARE(column->height(), 200.0); delete view; diff --git a/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp b/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp index e39162d75c..441c343927 100644 --- a/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp +++ b/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp @@ -1448,9 +1448,6 @@ void tst_qquickpositioners::test_attachedproperties_dynamic() QTRY_VERIFY(rect1->property("index").toInt() == 1); QTRY_VERIFY(rect1->property("firstItem").toBool() == false); -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-23483", Abort); -#endif QTRY_VERIFY(rect1->property("lastItem").toBool() == true); delete canvas; |