diff options
-rw-r--r-- | tests/auto/qeventloop/tst_qeventloop.cpp | 11 |
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)); } |