diff options
author | Serge Lysenko <sergii.lysenko@avid.com> | 2015-08-21 19:28:31 +0300 |
---|---|---|
committer | Serge Lysenko <sergii.lysenko@avid.com> | 2015-09-29 10:05:59 +0000 |
commit | 63949183f04ee953198e6544912404701151a98b (patch) | |
tree | e2297d63167c3799dff7a518bc41428b088b38bc /src/widgets/widgets/qmdisubwindow.cpp | |
parent | c359011dc53cf8c1c45dd86299b877c5e33ac740 (diff) |
Avoid unnecessary setParent(0) in QMdiSubWindow::removeBaseWidget()
QMdiSubWindow should not reset parent of base widget
if it has been already changed before.
Task-number: QTBUG-47993
Change-Id: I43e3a28481e9ba3026a93850a8cc1246a359852a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/widgets/qmdisubwindow.cpp')
-rw-r--r-- | src/widgets/widgets/qmdisubwindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp index c3b31ea5a4..7129c2ff44 100644 --- a/src/widgets/widgets/qmdisubwindow.cpp +++ b/src/widgets/widgets/qmdisubwindow.cpp @@ -1000,7 +1000,9 @@ void QMdiSubWindowPrivate::removeBaseWidget() q->setWindowModified(false); } lastChildWindowTitle.clear(); - baseWidget->setParent(0); + // QTBUG-47993: parent widget can be reset before this call + if (baseWidget->parentWidget() == q) + baseWidget->setParent(0); baseWidget = 0; isWidgetHiddenByUs = false; } |