From c66d00a7f53d6a6a847bc7171529273f4d089923 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 10 Jul 2012 13:10:28 +1000 Subject: Stabilize Loader test. Wait for Loader to load its item, rather than using a fixed timeout value. Change-Id: I97ee56d0d7161c9c71a5524f108b0f56d92cc3f3 Reviewed-by: Matthew Vogt --- tests/auto/quick/qquickloader/tst_qquickloader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/quick/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp index fa09779f73..99ae42b3d5 100644 --- a/tests/auto/quick/qquickloader/tst_qquickloader.cpp +++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp @@ -705,8 +705,10 @@ void tst_QQuickLoader::initialPropertyValues() QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); - qApp->processEvents(); - QTest::qWait(50); + if (expectedWarnings.isEmpty()) { + QQuickLoader *loader = object->findChild("loader"); + QTRY_VERIFY(loader->item()); + } for (int i = 0; i < propertyNames.size(); ++i) QCOMPARE(object->property(propertyNames.at(i).toLatin1().constData()), propertyValues.at(i)); -- cgit v1.2.3