summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsscene
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-05-19 15:52:55 +0200
committerKent Hansen <khansen@trolltech.com>2009-05-19 15:56:24 +0200
commit9a512ee004535983e12a1dd38dc2e28eb35c1d5c (patch)
tree2478ca41fad237ab5ffe7e0d019dcaaf1eb8fce7 /tests/auto/qgraphicsscene
parent1096c69365d14df903ad1dd0e842764146aee01d (diff)
make the changedSignal test more robust
On some platforms (e.g. Mac) it's not sufficient to call processEvents() only once. Reviewed-by: Andreas Aardal Hanssen
Diffstat (limited to 'tests/auto/qgraphicsscene')
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index da99c305ac..0c5ebf6dbd 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -47,6 +47,7 @@
#include <QtGui>
#include <math.h>
+#include "../../shared/util.h"
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
#include <windows.h>
@@ -3537,8 +3538,7 @@ void tst_QGraphicsScene::changedSignal()
scene.addItem(rect);
QCOMPARE(cl.changes.size(), 0);
- qApp->processEvents();
- QCOMPARE(cl.changes.size(), 1);
+ QTRY_COMPARE(cl.changes.size(), 1);
QCOMPARE(cl.changes.at(0).size(), 1);
QCOMPARE(cl.changes.at(0).first(), QRectF(0, 0, 10, 10));