qt5base-lts/tests/auto
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
..
cmake CMake: Fix configuration of CMake tests in-build-tree 2020-07-20 18:12:23 +02:00
concurrent QtConcurrent: Introduce runWithPromise() 2020-08-19 12:46:10 +02:00
corelib Deliver Quit event when calling QCoreApplication::quit() 2020-09-07 14:41:16 +02:00
dbus Deprecate the static int based API in QMetaType 2020-08-24 00:19:05 +02:00
gui Remove deprecated method QQuaternion::conjugate 2020-09-07 04:36:16 +02:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network Extend test blacklisting from Ubuntu 18.04 to 20.04 2020-09-03 14:30:04 +02:00
opengl Remove tst_QGL 2020-08-28 11:43:11 +02:00
other pro2cmake: Fix qmake parser's line continuation handling 2020-09-02 23:44:15 +02:00
printsupport Remove deprecated QPrinter and QPagedPaintDevice APIs 2020-09-04 08:37:59 +02:00
shared QWindowsFontDatabase: Check preferred family names for all fonts 2019-11-29 09:31:21 +01:00
sql QSqlite: Don't crash after binding too many placeholders 2020-08-24 13:50:55 +02:00
testlib Get rid of hasPendingEvents() and flush() 2020-09-06 00:17:12 +02:00
tools tst_qdbuscpp2xml: stop doing math on enumerations 2020-09-05 17:12:50 +02:00
widgets Deliver Quit event when calling QCoreApplication::quit() 2020-09-07 14:41:16 +02:00
xml Disable deprecation warnings in some tests 2020-07-29 14:33:23 +02:00
.prev_CMakeLists.txt CMake: Regenerate subdir test projects 2020-07-09 09:38:39 +02:00
auto.pro CMake: Get tests/auto/cmake tests working 2020-07-17 09:43:04 +02:00
CMakeLists.txt CMake: Get tests/auto/cmake tests working 2020-07-17 09:43:04 +02:00
network-settings.h Revert "QAbstractSocket: deprecate 'error' member-function" 2020-02-26 23:07:52 +03:00