diff -r cc75c76972ee -r c0432d11811c tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp --- a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp Wed Apr 21 12:15:23 2010 +0300 +++ b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp Wed Apr 21 20:15:53 2010 +0300 @@ -44,6 +44,8 @@ #include #include +#include "../../shared/util.h" + //TESTED_CLASS=QGraphicsLayout //TESTED_FILES= @@ -423,22 +425,15 @@ view.resize(150, 150); view.show(); - QApplication::processEvents(); - QTest::qWait(750); - QApplication::processEvents(); - - QCOMPARE(static_cast(li1->graphicsItem())->rect(), QRectF( 0, 0, 33, 99)); - QCOMPARE(static_cast(li2->graphicsItem())->rect(), QRectF(33, 0, 33, 99)); - QCOMPARE(static_cast(li3->graphicsItem())->rect(), QRectF(66, 0, 33, 99)); + QTRY_COMPARE(static_cast(li1->graphicsItem())->rect(), QRectF( 0, 0, 33, 99)); + QTRY_COMPARE(static_cast(li2->graphicsItem())->rect(), QRectF(33, 0, 33, 99)); + QTRY_COMPARE(static_cast(li3->graphicsItem())->rect(), QRectF(66, 0, 33, 99)); lout->setOrientation(Qt::Vertical); - QApplication::processEvents(); - QTest::qWait(750); - QApplication::processEvents(); - QCOMPARE(static_cast(li1->graphicsItem())->rect(), QRectF(0, 0, 99, 33)); - QCOMPARE(static_cast(li2->graphicsItem())->rect(), QRectF(0, 33, 99, 33)); - QCOMPARE(static_cast(li3->graphicsItem())->rect(), QRectF(0, 66, 99, 33)); + QTRY_COMPARE(static_cast(li1->graphicsItem())->rect(), QRectF(0, 0, 99, 33)); + QTRY_COMPARE(static_cast(li2->graphicsItem())->rect(), QRectF(0, 33, 99, 33)); + QTRY_COMPARE(static_cast(li3->graphicsItem())->rect(), QRectF(0, 66, 99, 33)); }