From 59faedcabc9fec35d6557935e06c33a9b4ead88c Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Thu, 17 Jun 2010 08:26:31 +1000 Subject: Attempt to stabilize tst_qwidgetaction::visibilityUpdate Replace this: QTest::qWait(some_delay); QVERIFY(some_async_condition); With this: QTRY_VERIFY(some_async_condition); --- tests/auto/qwidgetaction/tst_qwidgetaction.cpp | 10 ++++++---- 1 file 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 #include +#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 -- cgit v0.12