diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-01-12 03:35:35 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-01-12 03:43:58 (GMT) |
commit | dea7b0ba88871cb4b572b014a20a9918c4b3a8cf (patch) | |
tree | 1513fdf523a6c423e1b86c985c786da3a0047470 | |
parent | 190a9fe4a809f03b5f11a168c7912f04e1fe6ac9 (diff) | |
download | Qt-dea7b0ba88871cb4b572b014a20a9918c4b3a8cf.zip Qt-dea7b0ba88871cb4b572b014a20a9918c4b3a8cf.tar.gz Qt-dea7b0ba88871cb4b572b014a20a9918c4b3a8cf.tar.bz2 |
Fix states autotests to work with deferred properties.
-rw-r--r-- | tests/auto/declarative/states/tst_states.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("MyRect")); QVERIFY(innerRect != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlParentChange *pChange = qobject_cast<QmlParentChange*>(rect->states()->at(0)->changes()->at(0)); QVERIFY(pChange != 0); QmlGraphicsItem *nParent = qobject_cast<QmlGraphicsItem*>(rect->findChild<QmlGraphicsItem*>("NewParent")); @@ -497,6 +498,7 @@ void tst_states::anchorChanges() QmlGraphicsRectangle *innerRect = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("MyRect")); QVERIFY(innerRect != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlAnchorChanges *aChanges = qobject_cast<QmlAnchorChanges*>(rect->states()->at(0)->changes()->at(0)); QVERIFY(aChanges != 0); @@ -551,6 +553,7 @@ void tst_states::anchorChanges3() QmlGraphicsItem *bottomGuideline = qobject_cast<QmlGraphicsItem*>(rect->findChild<QmlGraphicsItem*>("BottomGuideline")); QVERIFY(bottomGuideline != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlAnchorChanges *aChanges = qobject_cast<QmlAnchorChanges*>(rect->states()->at(0)->changes()->at(0)); QVERIFY(aChanges != 0); @@ -596,6 +599,7 @@ void tst_states::anchorChanges4() QmlGraphicsItem *bottomGuideline = qobject_cast<QmlGraphicsItem*>(rect->findChild<QmlGraphicsItem*>("BottomGuideline")); QVERIFY(bottomGuideline != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlAnchorChanges *aChanges = qobject_cast<QmlAnchorChanges*>(rect->states()->at(0)->changes()->at(0)); QVERIFY(aChanges != 0); @@ -626,6 +630,7 @@ void tst_states::anchorChanges5() QmlGraphicsItem *bottomGuideline = qobject_cast<QmlGraphicsItem*>(rect->findChild<QmlGraphicsItem*>("BottomGuideline")); QVERIFY(bottomGuideline != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlAnchorChanges *aChanges = qobject_cast<QmlAnchorChanges*>(rect->states()->at(0)->changes()->at(0)); QVERIFY(aChanges != 0); @@ -683,6 +688,7 @@ void tst_states::explicitChanges() QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create()); QVERIFY(rect != 0); + qmlExecuteDeferred(rect->states()->at(0)); QmlPropertyChanges *changes = qobject_cast<QmlPropertyChanges*>(rect->findChild<QmlPropertyChanges*>("changes")); QVERIFY(changes != 0); QVERIFY(changes->isExplicit()); @@ -783,6 +789,7 @@ void tst_states::deletingChange() QmlState *state = rect->findChild<QmlState*>(); QVERIFY(state != 0); + qmlExecuteDeferred(state); QCOMPARE(state->changes()->count(), 1); rect->setState("blue"); |