diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-07-10 13:10:28 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-10 07:18:05 +0200 |
commit | c66d00a7f53d6a6a847bc7171529273f4d089923 (patch) | |
tree | c2fa03a936843391e740facb58749de3eab81660 /tests | |
parent | 953d068515937cb691f84e2512ea7aa4e2f9fea5 (diff) |
Stabilize Loader test.
Wait for Loader to load its item, rather than using
a fixed timeout value.
Change-Id: I97ee56d0d7161c9c71a5524f108b0f56d92cc3f3
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/quick/qquickloader/tst_qquickloader.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<QQuickLoader*>("loader"); + QTRY_VERIFY(loader->item()); + } for (int i = 0; i < propertyNames.size(); ++i) QCOMPARE(object->property(propertyNames.at(i).toLatin1().constData()), propertyValues.at(i)); |