tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
--- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp	Tue Jan 26 12:42:25 2010 +0200
+++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp	Tue Feb 02 00:43:10 2010 +0200
@@ -146,7 +146,7 @@
 {
     // since the style will influence the results, we have to ensure
     // that the tests are run using the same style on all platforms
-#ifdef Q_WS_S60
+#if defined( Q_WS_S60 )|| defined (Q_WS_WINCE)
     QApplication::setStyle(new QWindowsStyle);
 #else
     QApplication::setStyle(new QPlastiqueStyle);
@@ -664,16 +664,16 @@
     widget->show();
 
     layout.setContentsMargins(1, 2, 3, 4);
-    qApp->processEvents();
+    QApplication::sendPostedEvents(0, 0);
     QCOMPARE(layout.layoutRequest, 1);
 
     layout.setOrientation(Qt::Vertical);
-    qApp->processEvents();
+    QApplication::sendPostedEvents(0, 0);
     QCOMPARE(layout.layoutRequest, 2);
 
     for (int i = 0; i < count; ++i)
         layout.invalidate();        // Event is compressed, should only get one layoutrequest
-    qApp->processEvents();
+    QApplication::sendPostedEvents(0, 0);
     QCOMPARE(layout.layoutRequest, count ? 3 : 2);
     delete widget;
 }