summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qfusionstyle.cpp13
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp2
-rw-r--r--src/widgets/styles/qwindowsxpstyle.cpp10
3 files changed, 20 insertions, 5 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 95fd0e5b2f..98d45587f0 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -45,7 +45,8 @@
#include <qcombobox.h>
#if QT_CONFIG(pushbutton)
#include <qpushbutton.h>
-#else
+#endif
+#if QT_CONFIG(abstractbutton)
#include <qabstractbutton.h>
#endif
#include <qpainter.h>
@@ -3282,7 +3283,10 @@ void QFusionStyle::polish(QApplication *app)
void QFusionStyle::polish(QWidget *widget)
{
QCommonStyle::polish(widget);
- if (qobject_cast<QAbstractButton*>(widget)
+ if (false
+#if QT_CONFIG(abstractbutton)
+ || qobject_cast<QAbstractButton*>(widget)
+#endif
#if QT_CONFIG(combobox)
|| qobject_cast<QComboBox *>(widget)
#endif
@@ -3323,7 +3327,10 @@ void QFusionStyle::polish(QPalette &pal)
void QFusionStyle::unpolish(QWidget *widget)
{
QCommonStyle::unpolish(widget);
- if (qobject_cast<QAbstractButton*>(widget)
+ if (false
+#if QT_CONFIG(abstractbutton)
+ || qobject_cast<QAbstractButton*>(widget)
+#endif
#if QT_CONFIG(combobox)
|| qobject_cast<QComboBox *>(widget)
#endif
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 275a0550d2..2886093732 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -4268,6 +4268,7 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
case PE_PanelButtonTool:
case PE_PanelButtonCommand:
+#if QT_CONFIG(abstractbutton)
if (qobject_cast<const QAbstractButton *>(w) && rule.hasBackground() && rule.hasNativeBorder()) {
//the window style will draw the borders
ParentStyle::drawPrimitive(pe, opt, p, w);
@@ -4276,6 +4277,7 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
}
return;
}
+#endif
if (!rule.hasNativeBorder()) {
rule.drawRule(p, rule.boxRect(opt->rect, QRenderRule::Margin));
return;
diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp
index f3c6069f8a..b50c4b6be4 100644
--- a/src/widgets/styles/qwindowsxpstyle.cpp
+++ b/src/widgets/styles/qwindowsxpstyle.cpp
@@ -1139,7 +1139,10 @@ void QWindowsXPStyle::polish(QWidget *widget)
if (!QWindowsXPStylePrivate::useXP())
return;
- if (qobject_cast<QAbstractButton*>(widget)
+ if (false
+#if QT_CONFIG(abstractbutton)
+ || qobject_cast<QAbstractButton*>(widget)
+#endif
|| qobject_cast<QToolButton*>(widget)
|| qobject_cast<QTabBar*>(widget)
#ifndef QT_NO_COMBOBOX
@@ -1211,7 +1214,10 @@ void QWindowsXPStyle::unpolish(QWidget *widget)
// already in the map might be old (other style).
d->cleanupHandleMap();
}
- if (qobject_cast<QAbstractButton*>(widget)
+ if (false
+#if QT_CONFIG(abstractbutton)
+ || qobject_cast<QAbstractButton*>(widget)
+#endif
|| qobject_cast<QToolButton*>(widget)
|| qobject_cast<QTabBar*>(widget)
#ifndef QT_NO_COMBOBOX