summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwindowsurface
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-22 17:19:51 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-22 17:20:29 (GMT)
commitadea8ea0dd70a0a33d07e9ada1d0823b5fc637ac (patch)
tree585754d17d7dee6a6e371dd15b58a72cefa9c70b /tests/auto/qwindowsurface
parentf5d6022f4ca4af32de2b683dfb9f41173e7c8934 (diff)
downloadQt-adea8ea0dd70a0a33d07e9ada1d0823b5fc637ac.zip
Qt-adea8ea0dd70a0a33d07e9ada1d0823b5fc637ac.tar.gz
Qt-adea8ea0dd70a0a33d07e9ada1d0823b5fc637ac.tar.bz2
Stabilize some tests
Diffstat (limited to 'tests/auto/qwindowsurface')
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
index df87a42..2c5ba72 100644
--- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
+++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
@@ -155,11 +155,10 @@ void tst_QWindowSurface::flushOutsidePaintEvent()
// prevent custom styles from messing up the background
w.setStyle(new QWindowsStyle);
w.show();
+ QTest::qWaitForWindowShown(&w);
QApplication::processEvents();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&w);
-#elif defined(Q_WS_QWS)
+#if defined(Q_WS_QWS)
QApplication::sendPostedEvents(); //for the glib event loop
#elif defined(Q_WS_S60)
QTest::qWait(5000);
@@ -189,9 +188,6 @@ void tst_QWindowSurface::flushOutsidePaintEvent()
// the paintEvent() should overwrite the painted rectangle
QApplication::processEvents();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&w);
-#endif
#if defined(Q_WS_QWS)
QSKIP("task 176755", SkipAll);
@@ -232,8 +228,9 @@ void tst_QWindowSurface::grabWidget()
babyWidget.show();
childWidget.show();
parentWidget.show();
+ QTest::qWaitForWindowShown(&parentWidget);
- QTest::qWait(200);
+ QTest::qWait(20);
QPixmap parentPixmap = parentWidget.windowSurface()->grabWidget(&parentWidget);
QPixmap childPixmap = childWidget.windowSurface()->grabWidget(&childWidget);