From 2e02130e394083f8bc7fa04a8e0b6e0c0ed4e1b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 11 Sep 2015 13:03:39 +0200 Subject: 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 --- src/widgets/kernel/qapplication.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets') 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); -- cgit v1.2.3