qt6-bb10/tests/auto/corelib
Tor Arne Vestbø 89f7a2759c Deliver Quit event when calling QCoreApplication::quit()
Instead of QCoreApplication::quit() directly calling exit(0), which would
leave QGuiApplication and client code out of the loop, we now send the
Quit event, and let it pass through event delivery, before finally ending
up in QCoreApplication::event(), where we call exit(0).

This has the advantage that QGuiApplication can ensure all windows are
closed before quitting, and if any of those windows ignore the close
event the quit will be aborted. This aligns the behavior of synthetic
quits via QCoreApplication::quit() with spontaneous quits from the
platform via QGuiApplicationPrivate::processApplicationTermination.

Clients who wish to exit the application without any event delivery or
potential user interaction can call the lower level exit() function
directly.

[ChangeLog][QtGui] Application termination via qApp->quit() will now
deliver Quit events to the application, which in turn will result in
application windows being closed as part of the application quit,
with an option to cancel the application quit by ignoring the close
event. Clients who explicitly want to exit the application without
any user interaction should call QCoreApplication::exit() explicitly.

Task-number: QTBUG-45262
Task-number: QTBUG-33235
Task-number: QTBUG-72013
Task-number: QTBUG-59782
Change-Id: Id4b3907e329b9ecfd936fe9a5f8a70cb66b76bb7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-07 14:41:16 +02:00
..
animation Remove timeStep parameter from QAnimationDrive::advanceAnimation 2020-09-03 18:43:22 +02:00
global Round float->qfloat16 to even 2020-09-06 12:35:12 +02:00
io QStandardPaths/Unix: improve the XDG_RUNTIME_DIR creation/detection 2020-08-25 16:13:44 -07:00
itemmodels Long live QAIM::multiData! 2020-09-02 22:51:42 +02:00
kernel Deliver Quit event when calling QCoreApplication::quit() 2020-09-07 14:41:16 +02:00
mimetypes Fix warnings about unused expression results in tests 2020-07-29 14:33:29 +02:00
plugin Make QUUid constructors from string like types explicit 2020-08-27 18:58:21 +02:00
serialization Change QByteArray to handle large arrays 2020-08-27 18:58:20 +02:00
text Clean up QTextBoundaryFinder and qunicodetools 2020-09-07 09:09:55 +02:00
thread Get rid of hasPendingEvents() and flush() 2020-09-06 00:17:12 +02:00
time Fix crash on serializing default-constructed QTimeZone 2020-08-23 09:55:29 +02:00
tools QWeakPointer: purge deprecated API 2020-08-31 10:32:39 +02:00
.prev_CMakeLists.txt Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
CMakeLists.txt Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
corelib.pro Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00