diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-07-23 11:37:00 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-07-25 11:24:02 +0000 |
commit | 7964b7468de65459f3c0e431549fa93408c19a62 (patch) | |
tree | 5394150669c6c454ddffc3582b33bfe4f39564e8 /src/widgets/styles | |
parent | 2d02c4c799a4c45fe3f096a9bce95bd0b48b2743 (diff) |
Convert features.tabbar to QT_[REQUIRE_]CONFIG
Change-Id: Id21a95cbc61b2559a8f517ee60548b61536e3cc4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 24 | ||||
-rw-r--r-- | src/widgets/styles/qcommonstyle_p.h | 2 | ||||
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 28 | ||||
-rw-r--r-- | src/widgets/styles/qmacstyle_mac_p_p.h | 2 | ||||
-rw-r--r-- | src/widgets/styles/qstyleoption.cpp | 8 | ||||
-rw-r--r-- | src/widgets/styles/qstyleoption.h | 10 | ||||
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 32 | ||||
-rw-r--r-- | src/widgets/styles/qwindowsstyle.cpp | 8 | ||||
-rw-r--r-- | src/widgets/styles/qwindowsxpstyle.cpp | 2 |
9 files changed, 64 insertions, 52 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 12b4783827..5e43d69e8f 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -69,7 +69,9 @@ #include <qpainterpath.h> #include <qslider.h> #include <qstyleoption.h> +#if QT_CONFIG(tabbar) #include <qtabbar.h> +#endif #if QT_CONFIG(tabwidget) #include <qtabwidget.h> #endif @@ -368,7 +370,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q p->setPen(oldPen); } break; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case PE_FrameTabBarBase: if (const QStyleOptionTabBarBase *tbb = qstyleoption_cast<const QStyleOptionTabBarBase *>(opt)) { @@ -431,7 +433,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q } #else Q_UNUSED(d); -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) case PE_FrameTabWidget: case PE_FrameWindow: qDrawWinPanel(p, opt->rect, opt->palette, false, 0); @@ -575,7 +577,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q p->setBrush(oldBrush); break; } -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case PE_IndicatorTabTear: if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { bool rtl = tab->direction == Qt::RightToLeft; @@ -609,7 +611,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q p->drawPath(path); } break; -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) #ifndef QT_NO_LINEEDIT case PE_PanelLineEdit: if (const QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(opt)) { @@ -1104,7 +1106,7 @@ void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItem *opt, QRect #endif // QT_CONFIG(itemviews) -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) /*! \internal Compute the textRect and the pixmapRect from the opt rect @@ -1171,7 +1173,7 @@ void QCommonStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *w *textRect = tr; } -#endif //QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) #ifndef QT_NO_ANIMATION /*! \internal */ @@ -1718,7 +1720,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, } break; #endif // QT_NO_TOOLBOX -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case CE_TabBarTab: if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { proxy()->drawControl(CE_TabBarTabShape, tab, p, widget); @@ -1938,7 +1940,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, } } break; -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) #ifndef QT_NO_SIZEGRIP case CE_SizeGrip: { p->save(); @@ -2813,7 +2815,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, break; #endif // QT_CONFIG(tabwidget) -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case SE_TabBarTearIndicator: if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { switch (tab->shape) { @@ -4581,7 +4583,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid break; #endif // QT_NO_TOOLBAR -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case PM_TabBarTabOverlap: ret = 3; break; @@ -5225,7 +5227,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget case SH_ItemView_DrawDelegateFrame: ret = 0; break; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case SH_TabBar_CloseButtonPosition: ret = QTabBar::RightSide; break; diff --git a/src/widgets/styles/qcommonstyle_p.h b/src/widgets/styles/qcommonstyle_p.h index 7c69109ff7..9fb731239a 100644 --- a/src/widgets/styles/qcommonstyle_p.h +++ b/src/widgets/styles/qcommonstyle_p.h @@ -110,7 +110,7 @@ public: } #endif mutable QIcon tabBarcloseButtonIcon; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) void tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *pixmapRect) const; #endif diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index beedb5ee39..6117ea22c7 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -51,7 +51,9 @@ //#define DEBUG_SIZE_CONSTRAINT #include <private/qcore_mac_p.h> +#if QT_CONFIG(tabbar) #include <private/qtabbar_p.h> +#endif #include <private/qpainter_p.h> #include <qapplication.h> #include <qbitmap.h> @@ -232,7 +234,7 @@ static const qreal closeButtonCornerRadius = 2.0; typedef HIRect * (*PtrHIShapeGetBounds)(HIShapeRef, HIRect *); static PtrHIShapeGetBounds ptrHIShapeGetBounds = 0; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) static bool isVerticalTabs(const QTabBar::Shape shape) { return (shape == QTabBar::RoundedEast || shape == QTabBar::TriangularEast @@ -291,7 +293,7 @@ static void drawTabCloseButton(QPainter *p, bool hover, bool selected, bool pres p->drawLine(margin, height - margin, width - margin, margin); } -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) QRect rotateTabPainter(QPainter *p, QTabBar::Shape shape, QRect tabRect) { if (isVerticalTabs(shape)) { @@ -435,7 +437,7 @@ static inline bool isTreeView(const QWidget *widget) } #endif -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) static inline ThemeTabDirection getTabDirection(QTabBar::Shape shape) { ThemeTabDirection ttd; @@ -1077,7 +1079,7 @@ void QMacStylePrivate::drawFocusRing(QPainter *p, const QRect &targetRect, int h QRect(focusRingPixmap.width() - shCornerSize, svCornerSize, shCornerSize, focusRingPixmap.width() - 2 * svCornerSize)); } -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) void QMacStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *iconRect) const { Q_ASSERT(textRect); @@ -1140,7 +1142,7 @@ void QMacStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *widg *textRect = tr; } -#endif //QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) QAquaWidgetSize QMacStylePrivate::effectiveAquaSizeConstrain(const QStyleOption *option, const QWidget *widg, @@ -2293,7 +2295,7 @@ void QMacStyle::polish(QWidget* w) } #endif -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) if (QTabBar *tb = qobject_cast<QTabBar*>(w)) { if (tb->documentMode()) { w->setAttribute(Qt::WA_Hover); @@ -2345,7 +2347,7 @@ void QMacStyle::unpolish(QWidget* w) } #endif -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) if (qobject_cast<QTabBar*>(w)) { if (!w->testAttribute(Qt::WA_SetFont)) w->setFont(qApp->font(w)); @@ -2870,7 +2872,7 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w ret = QEvent::MouseButtonRelease; break; case SH_TabBar_SelectMouseType: -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) if (const QStyleOptionTabBarBase *opt2 = qstyleoption_cast<const QStyleOptionTabBarBase *>(opt)) { ret = opt2->documentMode ? QEvent::MouseButtonPress : QEvent::MouseButtonRelease; } else @@ -2903,7 +2905,7 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w } } #endif -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) if (const QTabBar *tab = qobject_cast<const QTabBar*>(w)) { if (tab->documentMode()) { ret = Qt::AlignLeft; @@ -3080,7 +3082,7 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w case SH_ItemView_PaintAlternatingRowColorsForEmptyArea: ret = true; break; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case SH_TabBar_CloseButtonPosition: ret = QTabBar::LeftSide; break; @@ -3236,7 +3238,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai p->drawPath(path); p->restore(); break; } -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case PE_FrameTabBarBase: if (const QStyleOptionTabBarBase *tbb = qstyleoption_cast<const QStyleOptionTabBarBase *>(opt)) { @@ -4135,7 +4137,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter QCommonStyle::drawControl(CE_ComboBoxLabel, &comboCopy, p, w); } break; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case CE_TabBarTabShape: if (const QStyleOptionTab *tabOpt = qstyleoption_cast<const QStyleOptionTab *>(opt)) { if (tabOpt->documentMode) { @@ -6663,7 +6665,7 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, } #endif break; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case QStyle::CT_TabBarTab: if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { const QAquaWidgetSize AquaSize = d->aquaSizeConstrain(opt, widget); diff --git a/src/widgets/styles/qmacstyle_mac_p_p.h b/src/widgets/styles/qmacstyle_mac_p_p.h index e465222137..50596e572d 100644 --- a/src/widgets/styles/qmacstyle_mac_p_p.h +++ b/src/widgets/styles/qmacstyle_mac_p_p.h @@ -244,7 +244,7 @@ public: void drawFocusRing(QPainter *p, const QRect &targetRect, int hMargin, int vMargin, qreal radius = 0) const; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) void tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *iconRect) const; #endif diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp index ae28dc9374..5d11b86ae7 100644 --- a/src/widgets/styles/qstyleoption.cpp +++ b/src/widgets/styles/qstyleoption.cpp @@ -1231,7 +1231,7 @@ QStyleOptionToolBar::QStyleOptionToolBar(int version) #endif -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) /*! \class QStyleOptionTab \brief The QStyleOptionTab class is used to describe the @@ -1479,7 +1479,7 @@ QStyleOptionTab::QStyleOptionTab(int version) The default value is QSize(-1, -1), i.e. an invalid size; */ -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) /*! \class QStyleOptionProgressBar @@ -3436,7 +3436,7 @@ QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame(int version) #endif // QT_CONFIG(tabwidget) -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) /*! \class QStyleOptionTabBarBase @@ -3556,7 +3556,7 @@ QStyleOptionTabBarBase::QStyleOptionTabBarBase(int version) The default value is false; */ -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) #ifndef QT_NO_SIZEGRIP /*! diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h index a951596776..af97479ef0 100644 --- a/src/widgets/styles/qstyleoption.h +++ b/src/widgets/styles/qstyleoption.h @@ -47,7 +47,9 @@ #include <QtGui/qmatrix.h> #include <QtWidgets/qslider.h> #include <QtWidgets/qstyle.h> +#if QT_CONFIG(tabbar) #include <QtWidgets/qtabbar.h> +#endif #if QT_CONFIG(tabwidget) #include <QtWidgets/qtabwidget.h> #endif @@ -173,7 +175,7 @@ typedef Q_DECL_DEPRECATED QStyleOptionTabWidgetFrame QStyleOptionTabWidgetFrameV #endif // QT_CONFIG(tabwidget) -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) class Q_WIDGETS_EXPORT QStyleOptionTabBarBase : public QStyleOption { public: @@ -193,7 +195,7 @@ protected: }; typedef Q_DECL_DEPRECATED QStyleOptionTabBarBase QStyleOptionTabBarBaseV2; -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) class Q_WIDGETS_EXPORT QStyleOptionHeader : public QStyleOption { @@ -247,7 +249,7 @@ protected: Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionButton::ButtonFeatures) -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) class Q_WIDGETS_EXPORT QStyleOptionTab : public QStyleOption { public: @@ -286,7 +288,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionTab::CornerWidgets) typedef Q_DECL_DEPRECATED QStyleOptionTab QStyleOptionTabV2; typedef Q_DECL_DEPRECATED QStyleOptionTab QStyleOptionTabV3; -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) #ifndef QT_NO_TOOLBAR diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 2274e5280f..5557dba430 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -76,7 +76,9 @@ #endif #include <private/qwindowsstyle_p_p.h> #include <private/qstyleanimation_p.h> +#if QT_CONFIG(tabbar) #include <qtabbar.h> +#endif #include <QMetaProperty> #include <qmainwindow.h> #if QT_CONFIG(dockwidget) @@ -1912,7 +1914,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption break; } #endif -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) } else if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { if (tab->position == QStyleOptionTab::OnlyOneTab) extraClass |= PseudoClass_OnlyOne; @@ -1948,7 +1950,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption default: break; } -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) } else if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { if (btn->features & QStyleOptionButton::Flat) extraClass |= PseudoClass_Flat; @@ -2425,7 +2427,7 @@ static bool unstylable(const QWidget *w) } #endif -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) if (w->metaObject() == &QWidget::staticMetaObject && qobject_cast<const QTabBar*>(w->parentWidget())) return true; // The moving tab of a QTabBar @@ -2812,7 +2814,7 @@ void QStyleSheetStyle::polish(QWidget *w) #if QT_CONFIG(itemviews) || qobject_cast<QHeaderView *>(w) #endif -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) || qobject_cast<QTabBar *>(w) #endif #ifndef QT_NO_FRAME @@ -2916,7 +2918,7 @@ void QStyleSheetStyle::unpolish(QApplication *app) styleSheetCaches->styleSheetCache.remove(qApp); } -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) inline static bool verticalTabs(QTabBar::Shape shape) { return shape == QTabBar::RoundedWest @@ -2924,7 +2926,7 @@ inline static bool verticalTabs(QTabBar::Shape shape) || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast; } -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *w) const @@ -4092,7 +4094,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q break; #endif // QT_CONFIG(itemviews) -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case CE_TabBarTab: if (hasStyleRule(w, PseudoElement_TabBarTab)) { QWindowsStyle::drawControl(ce, opt, p, w); @@ -4127,7 +4129,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q return; } break; -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) case CE_ColumnViewGrip: if (rule.hasDrawable()) { @@ -4534,7 +4536,7 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op case PE_IndicatorSpinPlus: pseudoElement = PseudoElement_SpinBoxUpArrow; break; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case PE_IndicatorTabClose: if (w) w = w->parentWidget(); //match on the QTabBar instead of the CloseButton @@ -5055,7 +5057,7 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op return rule.boxSize(sz); break; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case CT_TabBarTab: { QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab); if (subRule.hasBox() || !subRule.hasNativeBorder()) { @@ -5079,7 +5081,7 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op sz = subRule.adjustSize(csz); break; } -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) case CT_MdiControls: if (const QStyleOptionComplex *ccOpt = qstyleoption_cast<const QStyleOptionComplex *>(opt)) { @@ -5288,7 +5290,7 @@ int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWi #endif // QT_CONFIG(tabwidget) s = QLatin1String("alignment"); break; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case SH_TabBar_CloseButtonPosition: rule = renderRule(w, opt, PseudoElement_TabBarTabCloseButton); if (rule.hasPosition()) { @@ -5694,7 +5696,7 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c RECURSION_GUARD(return baseStyle()->subElementRect(se, opt, w)) QRenderRule rule = renderRule(w, opt); -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) int pe = PseudoElement_None; #endif @@ -5822,7 +5824,7 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c } break; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case SE_TabWidgetLeftCorner: pe = PseudoElement_TabWidgetLeftCorner; // intentionally falls through @@ -5889,7 +5891,7 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c } break; } -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) case SE_DockWidgetCloseButton: case SE_DockWidgetFloatButton: { diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index a8c4c33ada..1c51360c1f 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -55,7 +55,9 @@ #include "qrubberband.h" #endif #include "qstyleoption.h" +#if QT_CONFIG(tabbar) #include "qtabbar.h" +#endif #include "qwidget.h" #include "qdebug.h" #include "qmainwindow.h" @@ -334,7 +336,7 @@ int QWindowsStylePrivate::fixedPixelMetric(QStyle::PixelMetric pm) break; case QStyle::PM_DockWidgetSeparatorExtent: return 4; -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case QStyle::PM_TabBarTabShiftHorizontal: return 0; case QStyle::PM_TabBarTabShiftVertical: @@ -1283,7 +1285,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai } break; #endif // QT_NO_MENUBAR -#ifndef QT_NO_TABBAR +#if QT_CONFIG(tabbar) case CE_TabBarTabShape: if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { bool rtlHorTabs = (tab->direction == Qt::RightToLeft @@ -1486,7 +1488,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai } } break; -#endif // QT_NO_TABBAR +#endif // QT_CONFIG(tabbar) case CE_ToolBoxTabShape: qDrawShadePanel(p, opt->rect, opt->palette, opt->state & (State_Sunken | State_On), 1, diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp index 3c6b27bf7f..bb2c0688c4 100644 --- a/src/widgets/styles/qwindowsxpstyle.cpp +++ b/src/widgets/styles/qwindowsxpstyle.cpp @@ -58,7 +58,9 @@ #include <qdesktopwidget.h> #include <qtoolbutton.h> +#if QT_CONFIG(tabbar) #include <qtabbar.h> +#endif #if QT_CONFIG(combobox) #include <qcombobox.h> #endif |