summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qmacstyle_mac.mm
diff options
context:
space:
mode:
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) {