summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorDamian Jansen <damian.jansen@nokia.com>2010-11-24 00:51:29 (GMT)
committerDamian Jansen <damian.jansen@nokia.com>2010-11-24 00:51:29 (GMT)
commit5d0be38c15acf28969bd8bf984ab23a29fa8e354 (patch)
tree2ddb378cf9cb36ca691d22f0f3f47400431d2280 /tests/auto/declarative
parentea41bb4f6e097ee641e5fbee3242ccc5aa7e77b1 (diff)
downloadQt-5d0be38c15acf28969bd8bf984ab23a29fa8e354.zip
Qt-5d0be38c15acf28969bd8bf984ab23a29fa8e354.tar.gz
Qt-5d0be38c15acf28969bd8bf984ab23a29fa8e354.tar.bz2
Fix asynchronous reload call in test, broken by previous submit
Task-number: QTBUG-15493
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp3
1 files changed, 3 insertions, 0 deletions
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 <QtDeclarative/qdeclarativeitem.h>
#include <QtDeclarative/qdeclarativecontext.h>
#include <QtGui/qmenubar.h>
+#include <QSignalSpy>
#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<QDeclarativeItem*>(viewer->view()->rootObject());
QVERIFY(rootItem);