From c37a7442d298ccec251b9178a31b1f0c8f199676 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 20 May 2010 14:04:04 +1000 Subject: Make test more stable --- tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp index dd2f46e..b183105 100644 --- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp +++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp @@ -45,6 +45,7 @@ #include #include #include +#include "../../../shared/util.h" class tst_QDeclarativeView : public QObject @@ -106,9 +107,9 @@ void tst_QDeclarativeView::resizemodedeclarativeitem() // size update from root object declarativeItem->setWidth(250); declarativeItem->setHeight(350); - qApp->processEvents(); QCOMPARE(declarativeItem->width(), 250.0); QCOMPARE(declarativeItem->height(), 350.0); + QTRY_COMPARE(canvas->size(), QSize(250, 350)); QCOMPARE(canvas->size(), QSize(250, 350)); QCOMPARE(canvas->size(), canvas->sizeHint()); QCOMPARE(sceneResizedSpy.count(), 4); @@ -134,9 +135,9 @@ void tst_QDeclarativeView::resizemodedeclarativeitem() // size update from root object declarativeItem->setWidth(80); declarativeItem->setHeight(100); - qApp->processEvents(); QCOMPARE(declarativeItem->width(), 80.0); QCOMPARE(declarativeItem->height(), 100.0); + QTRY_COMPARE(canvas->size(), QSize(80, 100)); QCOMPARE(canvas->size(), QSize(80, 100)); QCOMPARE(canvas->size(), canvas->sizeHint()); QCOMPARE(sceneResizedSpy2.count(), 2); -- cgit v0.12