tests/auto/qwidgetaction/tst_qwidgetaction.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
child 33 3e2da88830cd
--- a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp	Wed Jun 23 19:07:03 2010 +0300
+++ b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp	Tue Jul 06 15:10:48 2010 +0300
@@ -51,6 +51,8 @@
 #include <qmainwindow.h>
 #include <qmenubar.h>
 
+#include "../../shared/util.h"
+
 //TESTED_CLASS=
 //TESTED_FILES=
 
@@ -190,8 +192,8 @@
     QVERIFY(action->isVisible());
 
     action->setVisible(false);
-    QTest::qWait(100); //the call to hide is delayed by the toolbar layout
-    QVERIFY(!combo->isVisible());
+    qApp->processEvents(); //the call to hide is delayed by the toolbar layout
+    QTRY_VERIFY(!combo->isVisible());
 
     delete action;
     // action also deletes combo