From dea7b0ba88871cb4b572b014a20a9918c4b3a8cf Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 12 Jan 2010 13:35:35 +1000 Subject: Fix states autotests to work with deferred properties. --- tests/auto/declarative/states/tst_states.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/auto/declarative/states/tst_states.cpp b/tests/auto/declarative/states/tst_states.cpp index 3301048..3c89747 100644 --- a/tests/auto/declarative/states/tst_states.cpp +++ b/tests/auto/declarative/states/tst_states.cpp @@ -398,6 +398,7 @@ void tst_states::parentChange() QmlGraphicsRectangle *innerRect = qobject_cast(rect->findChild("MyRect")); QVERIFY(innerRect != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlParentChange *pChange = qobject_cast(rect->states()->at(0)->changes()->at(0)); QVERIFY(pChange != 0); QmlGraphicsItem *nParent = qobject_cast(rect->findChild("NewParent")); @@ -497,6 +498,7 @@ void tst_states::anchorChanges() QmlGraphicsRectangle *innerRect = qobject_cast(rect->findChild("MyRect")); QVERIFY(innerRect != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlAnchorChanges *aChanges = qobject_cast(rect->states()->at(0)->changes()->at(0)); QVERIFY(aChanges != 0); @@ -551,6 +553,7 @@ void tst_states::anchorChanges3() QmlGraphicsItem *bottomGuideline = qobject_cast(rect->findChild("BottomGuideline")); QVERIFY(bottomGuideline != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlAnchorChanges *aChanges = qobject_cast(rect->states()->at(0)->changes()->at(0)); QVERIFY(aChanges != 0); @@ -596,6 +599,7 @@ void tst_states::anchorChanges4() QmlGraphicsItem *bottomGuideline = qobject_cast(rect->findChild("BottomGuideline")); QVERIFY(bottomGuideline != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlAnchorChanges *aChanges = qobject_cast(rect->states()->at(0)->changes()->at(0)); QVERIFY(aChanges != 0); @@ -626,6 +630,7 @@ void tst_states::anchorChanges5() QmlGraphicsItem *bottomGuideline = qobject_cast(rect->findChild("BottomGuideline")); QVERIFY(bottomGuideline != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlAnchorChanges *aChanges = qobject_cast(rect->states()->at(0)->changes()->at(0)); QVERIFY(aChanges != 0); @@ -683,6 +688,7 @@ void tst_states::explicitChanges() QmlGraphicsRectangle *rect = qobject_cast(rectComponent.create()); QVERIFY(rect != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlPropertyChanges *changes = qobject_cast(rect->findChild("changes")); QVERIFY(changes != 0); QVERIFY(changes->isExplicit()); @@ -783,6 +789,7 @@ void tst_states::deletingChange() QmlState *state = rect->findChild(); QVERIFY(state != 0); + qmlExecuteDeferred(state); QCOMPARE(state->changes()->count(), 1); rect->setState("blue"); -- cgit v0.12