From af1e344ac6046640ddb728f6017b3181469c241d Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 30 Sep 2009 15:56:43 +0300 Subject: Making tst_QListWidget::closePersistentEditor work for Symbian. The persistent editor was not closed in time, as events from Symbian app start up had not had time to be flushed through. The addition of a 1s QTest::qWait gives plenty of time for the app to settle. Probably the better fix would be to add piece of code to testlib which would empty the event queue before executing each test case. However this was seen as an risky solution. Reviewed-by: mread --- tests/auto/qlistwidget/tst_qlistwidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/auto/qlistwidget/tst_qlistwidget.cpp b/tests/auto/qlistwidget/tst_qlistwidget.cpp index d31b07f..e825c8f 100644 --- a/tests/auto/qlistwidget/tst_qlistwidget.cpp +++ b/tests/auto/qlistwidget/tst_qlistwidget.cpp @@ -302,6 +302,11 @@ void tst_QListWidget::openPersistentEditor() void tst_QListWidget::closePersistentEditor() { +#if defined(Q_OS_SYMBIAN) + //give the Symbian app start event queue time to clear + QTest::qWait(1000); +#endif + // Boundry checking int childCount = testWidget->viewport()->children().count(); testWidget->closePersistentEditor(0); -- cgit v0.12