summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-03-22 14:20:49 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2019-03-22 14:03:21 +0000
commit2a8fcbbcb3b441d2b5b32740bc828c7bc9096e4c (patch)
tree488aff2d8dc559d1d47ab235b95bc8a49030ba29
parent78888f485f1d70e98243deb2b6ab8911a7f8c9b2 (diff)
Try to stabilize qquickrectangle test
Similar to commit 9921180a44d9097b1b83c2fa7b3f36dbb555140c, introduce liberal use of QTRY_VERIFY. Fixes: QTBUG-74605 Change-Id: I4552b1df4021f78cddff08f0b7d8629fafe25acb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
index b34612ee88..832b973d96 100644
--- a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
+++ b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
@@ -159,17 +159,15 @@ void tst_qquickrectangle::gradient_multiple()
// Start off clean
QQuickItemPrivate *firstRectPriv = QQuickItemPrivate::get(firstRect);
QQuickItemPrivate *secondRectPriv = QQuickItemPrivate::get(secondRect);
- bool firstIsDirty = firstRectPriv->dirtyAttributes & QQuickItemPrivate::Content;
+ QTRY_VERIFY(!(firstRectPriv->dirtyAttributes & QQuickItemPrivate::Content));
bool secondIsDirty = secondRectPriv->dirtyAttributes & QQuickItemPrivate::Content;
- QVERIFY(!firstIsDirty);
QVERIFY(!secondIsDirty);
QMetaObject::invokeMethod(view.rootObject(), "changeGradient");
// Changing the gradient should have scheduled an update of both items
- firstIsDirty = firstRectPriv->dirtyAttributes & QQuickItemPrivate::Content;
+ QTRY_VERIFY(firstRectPriv->dirtyAttributes & QQuickItemPrivate::Content);
secondIsDirty = secondRectPriv->dirtyAttributes & QQuickItemPrivate::Content;
- QVERIFY(firstIsDirty);
QVERIFY(secondIsDirty);
}