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/qgraphicseffect | |
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/qgraphicseffect')
-rw-r--r-- | tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp | 14 |
1 files changed, 6 insertions, 8 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)); } |