Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
None
-
5.12.8, 5.14.2
Description
If application doesn't have any windows and it receives WM_QUIT message, it just returns immediately from exec(). The WM_QUIT message cannot be intercepted with anything as it is handled before native event filter and just causes the application to return from exec(). There is aboutToQuit signal, which was also suggested in QTBUG-16236 as alternative way, but that is not triggered if the application doesn't have any windows.
Steps to reproduce
- Start windowless app
- End it via task manager
- Note aboutToQuit is not emitted
References:
- https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-quit
- QCoreApplicationPrivate::execCleanup() src\corelib\kernel\qcoreapplication.cpp:1389
- QEventDispatcherWin32::processEvents() at src\corelib\kernel\qeventdispatcher_win.cpp:595