From 5d0be38c15acf28969bd8bf984ab23a29fa8e354 Mon Sep 17 00:00:00 2001 From: Damian Jansen Date: Wed, 24 Nov 2010 10:51:29 +1000 Subject: Fix asynchronous reload call in test, broken by previous submit Task-number: QTBUG-15493 --- tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp index 1c1c04b..21c7197 100644 --- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp +++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include "../../../shared/util.h" #include "qmlruntime.h" #include "deviceorientation.h" @@ -194,7 +195,9 @@ void tst_QDeclarativeViewer::loading() QCOMPARE(viewer->size(), QSize(250, 350)); QCOMPARE(viewer->size(), viewer->sizeHint()); + QSignalSpy statusSpy(viewer->view(), SIGNAL(statusChanged(QDeclarativeView::Status))); viewer->reload(); + QTRY_VERIFY(statusSpy.count() == 1); rootItem = qobject_cast(viewer->view()->rootObject()); QVERIFY(rootItem); -- cgit v0.12