Fix build with -no-feature-mdiarea
qmainwindowlayout.cpp:(.text+0x2976): undefined reference to `_q_tb_tabBarShapeFrom(QTabWidget::TabShape, QTabWidget::TabPosition)' _q_tb_tabBarShapeFrom is implemented in qmdiarea.cpp which is not compiled when the feature mdiarea is disabled. Change-Id: Ib0c6447b9381b8ce01542fabf831a9db7f5e6675 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 7346de649195d7fed39fa31ab1b11f42cd62f3a9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
32bc25d03f
commit
96636de2d7
@ -220,19 +220,7 @@ static inline QMdiArea *mdiAreaParent(QWidget *widget)
|
||||
}
|
||||
|
||||
#if QT_CONFIG(tabwidget)
|
||||
QTabBar::Shape _q_tb_tabBarShapeFrom(QTabWidget::TabShape shape, QTabWidget::TabPosition position)
|
||||
{
|
||||
const bool rounded = (shape == QTabWidget::Rounded);
|
||||
if (position == QTabWidget::North)
|
||||
return rounded ? QTabBar::RoundedNorth : QTabBar::TriangularNorth;
|
||||
if (position == QTabWidget::South)
|
||||
return rounded ? QTabBar::RoundedSouth : QTabBar::TriangularSouth;
|
||||
if (position == QTabWidget::East)
|
||||
return rounded ? QTabBar::RoundedEast : QTabBar::TriangularEast;
|
||||
if (position == QTabWidget::West)
|
||||
return rounded ? QTabBar::RoundedWest : QTabBar::TriangularWest;
|
||||
return QTabBar::RoundedNorth;
|
||||
}
|
||||
QTabBar::Shape _q_tb_tabBarShapeFrom(QTabWidget::TabShape shape, QTabWidget::TabPosition position);
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
|
||||
static inline QString tabTextFor(QMdiSubWindow *subWindow)
|
||||
|
@ -1407,6 +1407,20 @@ void QTabWidget::clear()
|
||||
removeTab(0);
|
||||
}
|
||||
|
||||
QTabBar::Shape _q_tb_tabBarShapeFrom(QTabWidget::TabShape shape, QTabWidget::TabPosition position)
|
||||
{
|
||||
const bool rounded = (shape == QTabWidget::Rounded);
|
||||
if (position == QTabWidget::North)
|
||||
return rounded ? QTabBar::RoundedNorth : QTabBar::TriangularNorth;
|
||||
if (position == QTabWidget::South)
|
||||
return rounded ? QTabBar::RoundedSouth : QTabBar::TriangularSouth;
|
||||
if (position == QTabWidget::East)
|
||||
return rounded ? QTabBar::RoundedEast : QTabBar::TriangularEast;
|
||||
if (position == QTabWidget::West)
|
||||
return rounded ? QTabBar::RoundedWest : QTabBar::TriangularWest;
|
||||
return QTabBar::RoundedNorth;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qtabwidget.cpp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user