diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-02 07:47:16 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-02 07:47:16 (GMT) |
commit | f51b454100b4145350617ab3ff13bbf596deb2dc (patch) | |
tree | c1aa19201f57091c638c28d9ac9173f990c9b02e /tests | |
parent | ea6d4e94c802f648e296eec0bde1661728d82024 (diff) | |
download | Qt-f51b454100b4145350617ab3ff13bbf596deb2dc.zip Qt-f51b454100b4145350617ab3ff13bbf596deb2dc.tar.gz Qt-f51b454100b4145350617ab3ff13bbf596deb2dc.tar.bz2 |
Stabilize tests on X11
Diffstat (limited to 'tests')
4 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 21f6269..297b6d3 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -6306,6 +6306,7 @@ void tst_QGraphicsItem::itemStacksBehindParent() QGraphicsView view(&scene); view.show(); QTest::qWaitForWindowShown(&view); + QTRY_VERIFY(!paintedItems.isEmpty()); QTest::qWait(100); paintedItems.clear(); view.viewport()->update(); @@ -6315,7 +6316,7 @@ void tst_QGraphicsItem::itemStacksBehindParent() << grandChild121 << child12 << parent1 << grandChild211 << child21 << grandChild221 << child22 << parent2)); - QCOMPARE(paintedItems, QList<QGraphicsItem *>() + QTRY_COMPARE(paintedItems, QList<QGraphicsItem *>() << parent2 << child22 << grandChild221 << child21 << grandChild211 << parent1 << child12 << grandChild121 diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index f0ed008..76e7202 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -1296,7 +1296,7 @@ void tst_QGraphicsProxyWidget::paintEvent() w->show(); QTest::qWaitForWindowShown(w); QApplication::processEvents(); - + QTest::qWait(50); proxy.setWidget(w); scene.addItem(&proxy); diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index a76e607..e55dc9aa 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -1657,7 +1657,7 @@ void tst_QGraphicsScene::hoverEvents_siblings() qApp->processEvents(); // this posts updates from the scene to the view qApp->processEvents(); // which trigger a repaint here - QVERIFY(items.at(i)->isHovered); + QTRY_VERIFY(items.at(i)->isHovered); if (j && i > 0) QVERIFY(!items.at(i - 1)->isHovered); if (!j && i < 14) diff --git a/tests/auto/qgridlayout/tst_qgridlayout.cpp b/tests/auto/qgridlayout/tst_qgridlayout.cpp index 3c7e1fb..7c320be 100644 --- a/tests/auto/qgridlayout/tst_qgridlayout.cpp +++ b/tests/auto/qgridlayout/tst_qgridlayout.cpp @@ -884,6 +884,7 @@ void tst_QGridLayout::minMaxSize() for (int pass = 0; pass < 2; ++pass) { m_toplevel->hide(); QApplication::processEvents(); + QTest::qWait(20); // Test if removeItem uninitializes data properly while (m_grid->count()) { QLayoutItem *item = m_grid->itemAt(0); |