summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarko Kenttala <ext-marko.r.kenttala@nokia.com>2012-05-31 08:25:06 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-06-07 09:27:22 (GMT)
commit90eadd0c4b6de7d1ab4ba3472ffb9afe1539194c (patch)
tree2962f138f317371da956d14264f52b58e23cc18f /tests
parentda65ccd2b1877355f1ce97daaecb9a6e5178cd6c (diff)
downloadQt-90eadd0c4b6de7d1ab4ba3472ffb9afe1539194c.zip
Qt-90eadd0c4b6de7d1ab4ba3472ffb9afe1539194c.tar.gz
Qt-90eadd0c4b6de7d1ab4ba3472ffb9afe1539194c.tar.bz2
Fix for QEventLoop autotest for Symbian
Test deliverInDefinedOrder_QTBUG19637 was skipped in Symbian to avoid crashing. Test crashed because object events could not be processed in time in slower Symbian devices. Added waiting for all events to be processed before checking actual event count. Task-Number: QTBUG-23974 Change-Id: Idd79d4ec9fe21a4f03f2d9ba2e365abbbc45c9d8 Reviewed-by: Murray Read <ext-murray.2.read@nokia.com> Reviewed-by: Juha Kukkonen <ext-juha.kukkonen@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qeventloop/tst_qeventloop.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/qeventloop/tst_qeventloop.cpp b/tests/auto/qeventloop/tst_qeventloop.cpp
index 53d0475..fe1e40c 100644
--- a/tests/auto/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/qeventloop/tst_qeventloop.cpp
@@ -878,15 +878,16 @@ namespace DeliverInDefinedOrder_QTBUG19637 {
void moveToThread(QThread *t) {
QObject::moveToThread(t);
}
+ void processEvents() {
+ // Process all events for this thread
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 30000);
+ }
};
}
void tst_QEventLoop::deliverInDefinedOrder_QTBUG19637()
{
-#ifdef Q_OS_SYMBIAN
- QSKIP("Causes test suite to crash - see QTBUG-23974", SkipAll);
-#endif
using namespace DeliverInDefinedOrder_QTBUG19637;
qMetaTypeId<QThread*>();
QThread threads[NbThread];
@@ -907,8 +908,10 @@ void tst_QEventLoop::deliverInDefinedOrder_QTBUG19637()
}
}
- QTest::qWait(30);
for (int o = 0; o < NbObject; o++) {
+ // Wait until all events processed
+ QMetaObject::invokeMethod(&objects[o], "processEvents", Qt::BlockingQueuedConnection);
+ // Test event count
QTRY_COMPARE(objects[o].count, int(NbEvent));
}