diff options
author | Damian Jansen <damian.jansen@nokia.com> | 2010-11-24 00:51:29 (GMT) |
---|---|---|
committer | Damian Jansen <damian.jansen@nokia.com> | 2010-11-24 00:51:29 (GMT) |
commit | 5d0be38c15acf28969bd8bf984ab23a29fa8e354 (patch) | |
tree | 2ddb378cf9cb36ca691d22f0f3f47400431d2280 /tests/auto/declarative | |
parent | ea41bb4f6e097ee641e5fbee3242ccc5aa7e77b1 (diff) | |
download | Qt-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.cpp | 3 |
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); |