summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-08-27 19:07:31 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2018-05-02 09:07:03 +0000
commit364bd6ca74b059ffe8ae367e1562645a3ed0855e (patch)
treede86fa29ad2835030603e39c5fac2b0f186ad8c9 /src/widgets/styles/qstylesheetstyle.cpp
parent3761d99512244ae167a66e6894c75eb2ef1cca48 (diff)
Convert features.toolbar to QT_[REQUIRE_]CONFIG
Move declaration of pick/perp helpers up the dependency chain Change-Id: I7084ed829a057a0c45d60445c416fb07f2cb5624 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index cdeb6a5768..94509f621e 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -111,7 +111,9 @@
#include "qdrawutil.h"
#include <limits.h>
+#if QT_CONFIG(toolbar)
#include <QtWidgets/qtoolbar.h>
+#endif
QT_BEGIN_NAMESPACE
@@ -1979,7 +1981,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
if (frm->features & QStyleOptionFrame::Flat)
extraClass |= PseudoClass_Flat;
}
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
else if (const QStyleOptionToolBar *tb = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
if (tb->toolBarArea == Qt::LeftToolBarArea)
extraClass |= PseudoClass_Left;
@@ -1999,7 +2001,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
else if (tb->positionWithinLine == QStyleOptionToolBar::OnlyOne)
extraClass |= PseudoClass_OnlyOne;
}
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
#if QT_CONFIG(toolbox)
else if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)) {
if (tb->position == QStyleOptionToolBox::OnlyOneTab)
@@ -3594,13 +3596,13 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
if (rule.hasBorder()) {
rule.drawBorder(p, rule.borderRect(opt->rect));
} else {
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (const QStyleOptionToolBar *tb = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
QStyleOptionToolBar newTb(*tb);
newTb.rect = rule.borderRect(opt->rect);
baseStyle()->drawControl(ce, &newTb, p, w);
}
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
}
return;
@@ -5923,12 +5925,12 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
return positionRect(w, subRule, subRule2, pe, opt->rect, opt->direction);
}
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case SE_ToolBarHandle:
if (hasStyleRule(w, PseudoElement_ToolBarHandle))
return ParentStyle::subElementRect(se, opt, w);
break;
-#endif //QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
// On mac we make pixel adjustments to layouts which are not
// desireable when you have custom style sheets on them