diff options
| author | Tor Arne Vestbø <[email protected]> | 2019-10-15 14:18:40 +0200 |
|---|---|---|
| committer | Tor Arne Vestbø <[email protected]> | 2020-09-14 12:41:00 +0200 |
| commit | 0c02f133f3daee146b805149e69bba8cee6727b2 (patch) | |
| tree | c013e3a10a6ae804f33c05e077dcf8b346a4eea7 /src/gui/kernel/qplatformintegration.cpp | |
| parent | cc570ce2fe22e6314d378d3f2d6e4ae1a08df3a2 (diff) | |
Plumb application quit through platform plugin
If we have a platform plugin we ask the platform to quit, and if
not we fall back to the base implementation of QCoreApplication
that sends Quit events directly.
This allows the platform to involve the rest of the system in the
process. The platform will then come back with a spontaneous quit
via QWSI::handleApplicationTermination(), which will then send
the corresponding Quit even from QGuiApplication like normal.
Task-number: QTBUG-45262
Task-number: QTBUG-33235
Task-number: QTBUG-72013
Task-number: QTBUG-59782
Change-Id: I0000aaf7192e4b905933c5da0e53901c6c88f26a
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/gui/kernel/qplatformintegration.cpp')
| -rw-r--r-- | src/gui/kernel/qplatformintegration.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index 1127ab43d23..634a04b791b 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -529,6 +529,20 @@ void QPlatformIntegration::beep() const { } +/*! + \since 6.0 + + Asks the platform to terminate the application. + + Overrides should ensure there's a callback into the QWSI + function handleApplicationTermination so that the quit can + be propagated to QtGui and the application. +*/ +void QPlatformIntegration::quit() const +{ + QWindowSystemInterface::handleApplicationTermination<QWindowSystemInterface::SynchronousDelivery>(); +} + #ifndef QT_NO_OPENGL /*! Platform integration function for querying the OpenGL implementation type. |
