QDockWidgetGroupWindow: Properly destroy gap items and separators
QDockWidgetGroupWindow::destroyIfSingleItemLeft() cleared the item list without checking for gap or separator items. When a QDockWidget was deleted during an active drag, these items were leaked. Call deleteAllLayoutItems() before clearing the item list. Amends e6d85cf28bc4f750b69c33b72c006b067ae1190f. Task-number: QTBUG-135442 Pick-to: 6.8 6.5 Change-Id: I94dffe162023c12bda1f801236ae4462229601b5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 12dfc8d5ed4756f15a9ce5252af80d3daa9fa074) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
7cd1dbce12
commit
b7aae99247
@ -732,6 +732,7 @@ void QDockWidgetGroupWindow::destroyIfSingleItemLeft()
|
||||
reparentToMainWindow(lastDockWidget);
|
||||
|
||||
// the group window could still have placeholder items => clear everything
|
||||
layoutInfo()->deleteAllLayoutItems();
|
||||
layoutInfo()->item_list.clear();
|
||||
|
||||
destroyOrHideIfEmpty();
|
||||
|
Loading…
x
Reference in New Issue
Block a user