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>
This commit is contained in:
Morten Johan Sørvig 2015-09-11 13:03:39 +02:00
parent 470c8b68df
commit 2e02130e39

View File

@ -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);