Fix build with -no-feature-tabbar

Change-Id: I7b692f5308efa92da8c2101e07e9a803c6c69d99
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Paul Olav Tvete 2017-02-13 16:53:53 +01:00 committed by Stephan Binner
parent 369876ee06
commit 06a3ac2671

View File

@ -2605,12 +2605,16 @@ bool QDockAreaLayout::insertGap(const QList<int> &path, QLayoutItem *dockWidgetI
QLayoutItem *QDockAreaLayout::plug(const QList<int> &path)
{
#if QT_CONFIG(tabbar)
Q_ASSERT(!path.isEmpty());
const int index = path.first();
Q_ASSERT(index >= 0 && index < QInternal::DockCount);
QLayoutItem *item = docks[index].plug(path.mid(1));
docks[index].reparentWidgets(mainWindow);
return item;
#else
return nullptr;
#endif
}
QLayoutItem *QDockAreaLayout::unplug(const QList<int> &path)