From 10c529b08de7cd55b4c3e3654464119246498273 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 16 Apr 2015 17:21:37 -0700 Subject: Add a way for auxiliary threads to handle events without CoreApp Long-lived threads started by Qt itself can now receive events even if QCoreApplication hasn't been created. This is required in all threads we start that will handle events, unless we're sure that the thread will exit before the global application object begins destruction. Otherwise, those threads will have race conditions dealing with the event delivery system trying to call the QCoreApplication::notify() virtual while the object is being destroyed. Change-Id: I27eaacb532114dd188c4ffff13d4ad2a4bb443e6 Reviewed-by: Olivier Goffart (Woboq GmbH) --- tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h') diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h index 09e15723ac..8efe374a2b 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h +++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h @@ -61,6 +61,8 @@ private slots: void QTBUG31606_QEventDestructorDeadLock(); void applicationEventFilters_mainThread(); void applicationEventFilters_auxThread(); + void threadedEventDelivery_data(); + void threadedEventDelivery(); }; #endif // TST_QCOREAPPLICATION_H -- cgit v1.2.3