diff options
author | Toby Tomkins <toby.tomkins@nokia.com> | 2010-04-07 04:12:37 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2010-04-07 04:12:37 (GMT) |
commit | b81f90ac0ff2be8f73bda785bb644281d515c291 (patch) | |
tree | 34286921b22a620bb9e608530a11bc4c564a34ce /tests/auto/qgraphicslayout | |
parent | 281d95827bdce97727ed56049bd4afbac917ee91 (diff) | |
download | Qt-b81f90ac0ff2be8f73bda785bb644281d515c291.zip Qt-b81f90ac0ff2be8f73bda785bb644281d515c291.tar.gz Qt-b81f90ac0ff2be8f73bda785bb644281d515c291.tar.bz2 |
Remove qWait functions as it is used in QTRY_* macros.
Reviewed-by: jason mcdonald
Diffstat (limited to 'tests/auto/qgraphicslayout')
-rw-r--r-- | tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp index fb2e145..dad3279 100644 --- a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp +++ b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp @@ -44,6 +44,8 @@ #include <QtGui> #include <math.h> +#include "../../shared/util.h" + //TESTED_CLASS=QGraphicsLayout //TESTED_FILES= @@ -423,22 +425,15 @@ void tst_QGraphicsLayout::alternativeLayoutItems() view.resize(150, 150); view.show(); - QApplication::processEvents(); - QTest::qWait(750); - QApplication::processEvents(); - - QCOMPARE(static_cast<QGraphicsRectItem*>(li1->graphicsItem())->rect(), QRectF( 0, 0, 33, 99)); - QCOMPARE(static_cast<QGraphicsRectItem*>(li2->graphicsItem())->rect(), QRectF(33, 0, 33, 99)); - QCOMPARE(static_cast<QGraphicsRectItem*>(li3->graphicsItem())->rect(), QRectF(66, 0, 33, 99)); + QTRY_COMPARE(static_cast<QGraphicsRectItem*>(li1->graphicsItem())->rect(), QRectF( 0, 0, 33, 99)); + QTRY_COMPARE(static_cast<QGraphicsRectItem*>(li2->graphicsItem())->rect(), QRectF(33, 0, 33, 99)); + QTRY_COMPARE(static_cast<QGraphicsRectItem*>(li3->graphicsItem())->rect(), QRectF(66, 0, 33, 99)); lout->setOrientation(Qt::Vertical); - QApplication::processEvents(); - QTest::qWait(750); - QApplication::processEvents(); - QCOMPARE(static_cast<QGraphicsRectItem*>(li1->graphicsItem())->rect(), QRectF(0, 0, 99, 33)); - QCOMPARE(static_cast<QGraphicsRectItem*>(li2->graphicsItem())->rect(), QRectF(0, 33, 99, 33)); - QCOMPARE(static_cast<QGraphicsRectItem*>(li3->graphicsItem())->rect(), QRectF(0, 66, 99, 33)); + QTRY_COMPARE(static_cast<QGraphicsRectItem*>(li1->graphicsItem())->rect(), QRectF(0, 0, 99, 33)); + QTRY_COMPARE(static_cast<QGraphicsRectItem*>(li2->graphicsItem())->rect(), QRectF(0, 33, 99, 33)); + QTRY_COMPARE(static_cast<QGraphicsRectItem*>(li3->graphicsItem())->rect(), QRectF(0, 66, 99, 33)); } |