From bd618f62d8d796638ee72374a0fcdfd6c6b7aa97 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 19 Jul 2012 14:13:14 +0200 Subject: QtDeclarative: Remove usage of deprecated qWaitForWindowShown(). - Replace by qWaitForWindowExposed() or qWaitForWindowActive() where applicable. - Use QVERIFY to verify success. - Stabilize some tests by checking for 'active', add missing call to show(). Change-Id: I6cae063e44a3839760ed9f61dacb26cd1717118d Reviewed-by: Stephen Kelly --- tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp') diff --git a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp index 2a87c24b22..3fb20f7f5c 100644 --- a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp +++ b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp @@ -432,7 +432,7 @@ void tst_qquickpositioners::test_horizontal_animated() QCOMPARE(two->x(), -100.0); QCOMPARE(three->x(), -100.0); - QTest::qWaitForWindowShown(window); //It may not relayout until the next frame, so it needs to be drawn + QVERIFY(QTest::qWaitForWindowExposed(window)); //It may not relayout until the next frame, so it needs to be drawn QQuickItem *row = window->rootObject()->findChild("row"); QVERIFY(row); @@ -486,7 +486,7 @@ void tst_qquickpositioners::test_horizontal_animated_rightToLeft() QCOMPARE(two->x(), -100.0); QCOMPARE(three->x(), -100.0); - QTest::qWaitForWindowShown(window); //It may not relayout until the next frame, so it needs to be drawn + QVERIFY(QTest::qWaitForWindowExposed(window)); //It may not relayout until the next frame, so it needs to be drawn QQuickItem *row = window->rootObject()->findChild("row"); QVERIFY(row); @@ -1000,7 +1000,7 @@ void tst_qquickpositioners::test_vertical_animated() QVERIFY(three != 0); QCOMPARE(three->y(), -100.0); - QTest::qWaitForWindowShown(window); //It may not relayout until the next frame, so it needs to be drawn + QVERIFY(QTest::qWaitForWindowExposed(window)); //It may not relayout until the next frame, so it needs to be drawn QQuickItem *column = window->rootObject()->findChild("column"); QVERIFY(column); @@ -1248,7 +1248,7 @@ void tst_qquickpositioners::test_grid_animated() QCOMPARE(five->x(), -100.0); QCOMPARE(five->y(), -100.0); - QTest::qWaitForWindowShown(window); //It may not relayout until the next frame, so it needs to be drawn + QVERIFY(QTest::qWaitForWindowExposed(window)); //It may not relayout until the next frame, so it needs to be drawn QQuickItem *grid = window->rootObject()->findChild("grid"); QVERIFY(grid); @@ -1333,7 +1333,7 @@ void tst_qquickpositioners::test_grid_animated_rightToLeft() QCOMPARE(five->x(), -100.0); QCOMPARE(five->y(), -100.0); - QTest::qWaitForWindowShown(window); //It may not relayout until the next frame, so it needs to be drawn + QVERIFY(QTest::qWaitForWindowExposed(window)); //It may not relayout until the next frame, so it needs to be drawn QQuickItem *grid = window->rootObject()->findChild("grid"); QVERIFY(grid); @@ -2022,7 +2022,7 @@ QQuickView *tst_qquickpositioners::createView(const QString &filename, bool wait window->show(); qDebug() << "3"; if (wait) - QTest::qWaitForWindowShown(window); //It may not relayout until the next frame, so it needs to be drawn + QTest::qWaitForWindowExposed(window); //It may not relayout until the next frame, so it needs to be drawn qDebug() << "4"; return window; -- cgit v1.2.3