QMainWindowLayout: Fix build with -no-feature-dockwidget
Make deletion of unused tab bars conditional to dockwidget and tabwidget features. Task-number: QTBUG-135468 Pick-to: 6.8 6.5 Change-Id: I0ecb55ab20737f401796cdd4ebbc6040e54b5afe Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit b37f84ba414f36d941d42f7addb2f8ca1516d3d6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
08a65966af
commit
541d53f28d
@ -2727,10 +2727,12 @@ QMainWindowLayout::~QMainWindowLayout()
|
||||
|
||||
delete statusbar;
|
||||
|
||||
#if QT_CONFIG(dockwidget) && QT_CONFIG(tabwidget)
|
||||
// unusedTabBars contains unparented tab bars, which need to be removed manually.
|
||||
// ~QMainWindowTabBar() removes the bar from unusedTabBars => call qDeleteAll() on a copy.
|
||||
const auto bars = unusedTabBars;
|
||||
qDeleteAll(bars);
|
||||
#endif // QT_CONFIG(dockwidget) && QT_CONFIG(tabwidget)
|
||||
}
|
||||
|
||||
void QMainWindowLayout::setDockOptions(QMainWindow::DockOptions opts)
|
||||
|
Loading…
x
Reference in New Issue
Block a user