summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-09-11 13:03:39 +0200
committerMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-09-23 13:02:10 +0000
commit2e02130e394083f8bc7fa04a8e0b6e0c0ed4e1b2 (patch)
tree9ee3496de335bc433529b543af40b0835a8ae7e3 /src/widgets
parent470c8b68df539ca7356cd6b8596f8323ba3ed779 (diff)
Close QWidgetWindows by closing the window
Close the window instead of closing the widget. This will run the QWidget close implementation followed by the QWindow close implementation. Change-Id: Iaba3cf0359410def858363a02fceaeddb7095aaa Task-number: QTBUG-43344 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qapplication.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 48c2bf5084..148ed61424 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -1905,7 +1905,7 @@ bool QApplicationPrivate::tryCloseAllWidgetWindows(QWindowList *processedWindows
if (!w->isVisible() || w->data->is_closing)
break;
QWindow *window = w->windowHandle();
- if (!w->close()) // Qt::WA_DeleteOnClose may cause deletion.
+ if (!window->close()) // Qt::WA_DeleteOnClose may cause deletion.
return false;
if (window)
processedWindows->append(window);
@@ -1917,7 +1917,7 @@ bool QApplicationPrivate::tryCloseAllWidgetWindows(QWindowList *processedWindows
if (w->isVisible() && w->windowType() != Qt::Desktop &&
!w->testAttribute(Qt::WA_DontShowOnScreen) && !w->data->is_closing) {
QWindow *window = w->windowHandle();
- if (!w->close()) // Qt::WA_DeleteOnClose may cause deletion.
+ if (!window->close()) // Qt::WA_DeleteOnClose may cause deletion.
return false;
if (window)
processedWindows->append(window);