summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-01-17 14:49:55 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2018-02-21 18:43:13 +0000
commit2f9bdeba17ac1e980c0b9702c4f346c242da6ef1 (patch)
treed47233218039e884ce5269d6e84fdd78239712f0 /src/gui/kernel/qwindow.cpp
parentb949c447831d65fcf1a00feea151cd94a1021ed3 (diff)
Add QPlatformWindow::close()
Platforms can reimplement this function to control how non-spontaneous window close is handled. Make QWindow::close() call this function. Change-Id: I3da13e6c8519de2af7e54334d8a1e833ce98cba1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 2c7e061bcf..5db740acb9 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2144,10 +2144,7 @@ bool QWindow::close()
if (!d->platformWindow)
return true;
- bool accepted = false;
- QWindowSystemInterface::handleCloseEvent(this, &accepted);
- QWindowSystemInterface::flushWindowSystemEvents();
- return accepted;
+ return d->platformWindow->close();
}
/*!