diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-09-23 16:22:29 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-09-23 16:27:44 (GMT) |
commit | 92b717cbfb94bffbdc1a4d22f67ad359ba81a439 (patch) | |
tree | 49dcd965d65222e036df9ed2ee18608a42f4fe90 /tests/auto | |
parent | af876ae5a55526afa4aedc3d8b214d66b50032e6 (diff) | |
download | Qt-92b717cbfb94bffbdc1a4d22f67ad359ba81a439.zip Qt-92b717cbfb94bffbdc1a4d22f67ad359ba81a439.tar.gz Qt-92b717cbfb94bffbdc1a4d22f67ad359ba81a439.tar.bz2 |
Stabilize QGraphicsEffect and QToolTip test
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp | 14 | ||||
-rw-r--r-- | tests/auto/qtooltip/tst_qtooltip.cpp | 9 |
2 files changed, 11 insertions, 12 deletions
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp index ba3783b..0201bc4 100644 --- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp @@ -48,6 +48,8 @@ #include <QtGui/qgraphicsitem.h> #include <QtGui/qstyleoption.h> +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES= @@ -261,10 +263,8 @@ void tst_QGraphicsEffect::draw() QGraphicsView view(&scene); view.show(); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&view); -#endif - QTest::qWait(100); + QTest::qWaitForWindowShown(&view); + QTRY_VERIFY(item->numRepaints > 0); item->reset(); // Make sure installing the effect triggers a repaint. @@ -361,10 +361,8 @@ void tst_QGraphicsEffect::opacity() QGraphicsView view(&scene); view.show(); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&view); -#endif - QTest::qWait(100); + QTest::qWaitForWindowShown(&view); + QTRY_VERIFY(effect->numRepaints > 0); QCOMPARE(effect->m_opacity, qreal(0.5)); } diff --git a/tests/auto/qtooltip/tst_qtooltip.cpp b/tests/auto/qtooltip/tst_qtooltip.cpp index 2ad74a3..283effa 100644 --- a/tests/auto/qtooltip/tst_qtooltip.cpp +++ b/tests/auto/qtooltip/tst_qtooltip.cpp @@ -112,13 +112,14 @@ void tst_QToolTip::task183679() Widget_task183679 widget; widget.show(); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&widget); -#endif + QApplication::setActiveWindow(&widget); + QTest::qWaitForWindowShown(&widget); + QTest::qWait(30); + widget.showDelayedToolTip(100); QTest::qWait(300); - QVERIFY(QToolTip::isVisible()); + QTRY_VERIFY(QToolTip::isVisible()); QTest::keyPress(&widget, key); |