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:
parent
470c8b68df
commit
2e02130e39
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user