From 627bcb8a88f6c1be73b0bbd45f9488b37fd40e83 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 6 Jan 2012 10:57:12 +0100 Subject: Fix tst_qdeclarativestates::anchorsRewindBug failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/auto/qtquick2/qdeclarativestates/tst_qdeclarativestates.cpp | 3 --- tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp | 3 --- 2 files changed, 6 deletions(-) (limited to 'tests') 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; -- cgit v1.2.3