summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcrashhandler_unix.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2025-05-22 17:27:31 -0700
committerThiago Macieira <thiago.macieira@intel.com>2025-05-25 13:24:27 -0700
commitc8d3d7a7af73d97e0415b99df8d8378edb3117f5 (patch)
treebcc5cf794ee6bd4326c7747f3ade56f0f8629181 /src/testlib/qtestcrashhandler_unix.cpp
parent08325952eeb3a5cc9410a1b45e3445e97af51941 (diff)
QAbstractEventDispatcher: prevent too late unregistering of timers
Timers can't unregister when the dispatcher object is no longer of a dispatcher type. It's too late even at ~QAbstractEventDispatcher, because unregisterTimer() is a pure virtual. To prevent their attempting to unregister, we set the thread's dispatcher to nullptr if it is this object. This has been a latent bug, so it's worth fixing. This started happening for me with an un-pushed change that changed the order of how QCoreApplication and QGuiApplication destroy the main thread event dispatcher (namely, in their destructors, not waiting for ~QObject to deleteChildren()). Drive-by relax the store in QThread::setEventDispatcher(). Fixes: QTBUG-137130 Pick-to: 6.9 6.8 Change-Id: I8845736c38a931af62e3fffdfd3554874df89e8e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/testlib/qtestcrashhandler_unix.cpp')
0 files changed, 0 insertions, 0 deletions