diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2019-11-16 16:02:29 +0200 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2020-03-03 19:44:01 +0200 |
commit | 23785face5a01bf63334fd32975718468d5f816e (patch) | |
tree | cfdea28f388edfd2c994fe62dc350f191c71be95 /src/corelib/kernel/qeventdispatcher_win_p.h | |
parent | b711ee255515440b923a898f65f6afe13d63916f (diff) |
QEventDispatcherWin32: unregister event notifiers on close
When QEventDispatcherWin32::closingDown() is called,
threadData->eventDispatcher is already nullptr and the application
will no longer process the events.
Thus, just as it works for socket notifiers and timers, it makes sense
to disable all active event notifiers at this point. Otherwise, it
seems possible that an object in signalled state can provoke a data
race in the notifier's callback on 'edp' pointer, if
QWin32EventDispatcher destructor is running simultaneously.
Task-number: QTBUG-64152
Task-number: QTBUG-70214
Change-Id: I6e77f3eeca1b0ea639021e73b86798cba0200ebf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_win_p.h')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h index e6620178d8..a482c8b7db 100644 --- a/src/corelib/kernel/qeventdispatcher_win_p.h +++ b/src/corelib/kernel/qeventdispatcher_win_p.h @@ -110,6 +110,7 @@ protected: QEventDispatcherWin32(QEventDispatcherWin32Private &dd, QObject *parent = 0); virtual void sendPostedEvents(); void doUnregisterSocketNotifier(QSocketNotifier *notifier); + void doUnregisterEventNotifier(QWinEventNotifier *notifier); private: friend LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp); |