diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 06a49d8e0ff..4c271996c5b 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -59,7 +59,7 @@ #include #endif #if QT_CONFIG(tabbar) -#include +#include #endif #include #if QT_CONFIG(mainwindow) @@ -3076,16 +3076,6 @@ void QStyleSheetStyle::unpolish(QApplication *app) styleSheetCaches->styleSheetCache.remove(qApp); } -#if QT_CONFIG(tabbar) -inline static bool verticalTabs(QTabBar::Shape shape) -{ - return shape == QTabBar::RoundedWest - || shape == QTabBar::RoundedEast - || shape == QTabBar::TriangularWest - || shape == QTabBar::TriangularEast; -} -#endif // QT_CONFIG(tabbar) - void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *w) const { diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index ea408ec7f6a..da793126067 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -71,14 +71,6 @@ void QMovableTabWidget::paintEvent(QPaintEvent *e) p.drawPixmap(0, 0, m_pixmap); } -inline static bool verticalTabs(QTabBar::Shape shape) -{ - return shape == QTabBar::RoundedWest - || shape == QTabBar::RoundedEast - || shape == QTabBar::TriangularWest - || shape == QTabBar::TriangularEast; -} - void QTabBarPrivate::updateMacBorderMetrics() { #if defined(Q_OS_MACOS) diff --git a/src/widgets/widgets/qtabbar_p.h b/src/widgets/widgets/qtabbar_p.h index a421836b93a..831d3acd3c5 100644 --- a/src/widgets/widgets/qtabbar_p.h +++ b/src/widgets/widgets/qtabbar_p.h @@ -245,6 +245,14 @@ public: }; +constexpr inline bool verticalTabs(QTabBar::Shape shape) noexcept +{ + return shape == QTabBar::RoundedWest + || shape == QTabBar::RoundedEast + || shape == QTabBar::TriangularWest + || shape == QTabBar::TriangularEast; +} + QT_END_NAMESPACE #endif