qt5base-lts/tests/auto/corelib/kernel
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
..
qcoreapplication Deliver Quit event when calling QCoreApplication::quit() 2020-09-07 14:41:16 +02:00
qdeadlinetimer CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qelapsedtimer CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qeventdispatcher Synchronize QEventDispatcherWin32::processEvents() with QCoreApplication 2020-08-26 11:08:15 +03:00
qeventloop CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qmath CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qmetacontainer Add a QMetaSequence interface 2020-09-01 13:35:39 +02:00
qmetaenum CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qmetamethod Improve connect: Use existing metatypes if possible 2020-08-28 00:41:00 +02:00
qmetaobject Deprecate the static int based API in QMetaType 2020-08-24 00:19:05 +02:00
qmetaobjectbuilder CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qmetaproperty Deprecate the static int based API in QMetaType 2020-08-24 00:19:05 +02:00
qmetatype Reimplement QSequentialIterable using QMetaSequence 2020-09-03 08:27:44 +02:00
qmimedata CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qobject QObject: add a single shot connection flag 2020-09-01 17:59:36 +02:00
qpointer CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qproperty Fix QPropertyAlias to work with all kinds of properties 2020-09-02 22:44:29 +02:00
qsharedmemory CMake: Regenerate subdir test projects 2020-07-09 09:38:39 +02:00
qsignalblocker CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qsignalmapper CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qsocketnotifier CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qsystemsemaphore CMake: Regenerate subdir test projects 2020-07-09 09:38:39 +02:00
qtimer CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qtranslator Make QTranslator::load() insist that its return value be checked 2020-08-28 21:26:21 +02:00
qvariant Reimplement QSequentialIterable using QMetaSequence 2020-09-03 08:27:44 +02:00
qwineventnotifier CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
.prev_CMakeLists.txt Add a QMetaSequence interface 2020-09-01 13:35:39 +02:00
CMakeLists.txt Add a QMetaSequence interface 2020-09-01 13:35:39 +02:00
kernel.pro Add a QMetaSequence interface 2020-09-01 13:35:39 +02:00