diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-05-19 13:52:55 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-05-19 13:56:24 (GMT) |
commit | 9a512ee004535983e12a1dd38dc2e28eb35c1d5c (patch) | |
tree | 2478ca41fad237ab5ffe7e0d019dcaaf1eb8fce7 | |
parent | 1096c69365d14df903ad1dd0e842764146aee01d (diff) | |
download | Qt-9a512ee004535983e12a1dd38dc2e28eb35c1d5c.zip Qt-9a512ee004535983e12a1dd38dc2e28eb35c1d5c.tar.gz Qt-9a512ee004535983e12a1dd38dc2e28eb35c1d5c.tar.bz2 |
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
-rw-r--r-- | tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index da99c30..0c5ebf6 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)); |