summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeloader
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativeloader')
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index 3baf848..b62392d 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -61,15 +61,6 @@ inline QUrl TEST_FILE(const QString &filename)
return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
}
-#define TRY_WAIT(expr) \
- do { \
- for (int ii = 0; ii < 6; ++ii) { \
- if ((expr)) break; \
- QTest::qWait(50); \
- } \
- QVERIFY((expr)); \
- } while (false)
-
class tst_QDeclarativeLoader : public QObject
{
@@ -460,7 +451,7 @@ void tst_QDeclarativeLoader::networkRequestUrl()
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
- TRY_WAIT(loader->status() == QDeclarativeLoader::Ready);
+ QTRY_VERIFY(loader->status() == QDeclarativeLoader::Ready);
QVERIFY(loader->item());
QCOMPARE(loader->progress(), 1.0);
@@ -491,7 +482,7 @@ void tst_QDeclarativeLoader::networkComponent()
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(item->QGraphicsObject::children().at(1));
QVERIFY(loader);
- TRY_WAIT(loader->status() == QDeclarativeLoader::Ready);
+ QTRY_VERIFY(loader->status() == QDeclarativeLoader::Ready);
QVERIFY(loader->item());
QCOMPARE(loader->progress(), 1.0);
@@ -515,7 +506,7 @@ void tst_QDeclarativeLoader::failNetworkRequest()
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
- TRY_WAIT(loader->status() == QDeclarativeLoader::Error);
+ QTRY_VERIFY(loader->status() == QDeclarativeLoader::Error);
QVERIFY(loader->item() == 0);
QCOMPARE(loader->progress(), 0.0);