summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qmacstyle_mac.mm
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-07-29 09:04:28 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-08-10 05:37:30 +0000
commitee29be91c0b77d12f913f8f0b8d3f0d11a3a40fa (patch)
tree16838c05999760c53f713995b2360a1312b4720b /src/widgets/styles/qmacstyle_mac.mm
parente58fdbaeb033a801ac7b5dd1f63657b36d6e1305 (diff)
Convert features.toolbutton to QT_[REQUIRE_]CONFIG
Change-Id: I4227e1868da21bded76a8ec55996c436c8a8d763 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/styles/qmacstyle_mac.mm')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index ed6bde5404..e517ba3d04 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -97,7 +97,9 @@
#include <qsizegrip.h>
#include <qstyleoption.h>
#include <qtoolbar.h>
+#if QT_CONFIG(toolbutton)
#include <qtoolbutton.h>
+#endif
#if QT_CONFIG(treeview)
#include <qtreeview.h>
#endif
@@ -657,7 +659,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
else if (qobject_cast<const QComboBox *>(widg))
ct = QStyle::CT_ComboBox;
#endif
-#ifndef QT_NO_TOOLBUTTON
+#if QT_CONFIG(toolbutton)
else if (qobject_cast<const QToolButton *>(widg))
ct = QStyle::CT_ToolButton;
#endif
@@ -792,7 +794,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
if (sz == QAquaSizeSmall) {
int width = 0, height = 0;
if (szHint == QSize(-1, -1)) { //just 'guess'..
-#ifndef QT_NO_TOOLBUTTON
+#if QT_CONFIG(toolbutton)
const QToolButton *bt = qobject_cast<const QToolButton *>(widg);
// If this conversion fails then the widget was not what it claimed to be.
if(bt) {