summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicseffect
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-23 18:22:29 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-23 18:27:44 +0200
commit92b717cbfb94bffbdc1a4d22f67ad359ba81a439 (patch)
tree49dcd965d65222e036df9ed2ee18608a42f4fe90 /tests/auto/qgraphicseffect
parentaf876ae5a55526afa4aedc3d8b214d66b50032e6 (diff)
Stabilize QGraphicsEffect and QToolTip test
Diffstat (limited to 'tests/auto/qgraphicseffect')
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index ba3783be7a..0201bc4179 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));
}