summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-06-16 22:26:31 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-06-16 22:26:31 (GMT)
commit59faedcabc9fec35d6557935e06c33a9b4ead88c (patch)
treedc589c47045bda6affa10951d2e4868d65612d0a
parent0aaf5a740dc97de3d51d35a489eda25663503a31 (diff)
downloadQt-59faedcabc9fec35d6557935e06c33a9b4ead88c.zip
Qt-59faedcabc9fec35d6557935e06c33a9b4ead88c.tar.gz
Qt-59faedcabc9fec35d6557935e06c33a9b4ead88c.tar.bz2
Attempt to stabilize tst_qwidgetaction::visibilityUpdate
Replace this: QTest::qWait(some_delay); QVERIFY(some_async_condition); With this: QTRY_VERIFY(some_async_condition);
-rw-r--r--tests/auto/qwidgetaction/tst_qwidgetaction.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
index 5dfcd43..efe4838 100644
--- a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
+++ b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
@@ -51,6 +51,8 @@
#include <qmainwindow.h>
#include <qmenubar.h>
+#include "../../shared/util.h"
+
//TESTED_CLASS=
//TESTED_FILES=
@@ -185,13 +187,13 @@ void tst_QWidgetAction::visibilityUpdate()
action->setDefaultWidget(combo);
tb.addAction(action);
- qApp->processEvents(); //the call to show is delayed by the toolbar layout
- QVERIFY(combo->isVisible());
+ //the call to show is delayed by the toolbar layout
+ QTRY_VERIFY(combo->isVisible());
QVERIFY(action->isVisible());
action->setVisible(false);
- QTest::qWait(100); //the call to hide is delayed by the toolbar layout
- QVERIFY(!combo->isVisible());
+ //the call to hide is delayed by the toolbar layout
+ QTRY_VERIFY(!combo->isVisible());
delete action;
// action also deletes combo