diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-15 16:30:10 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-15 16:31:48 +0200 |
commit | 106d3b9bf93325ea93c678270290b2c3dda9b764 (patch) | |
tree | 26c56932d60964c83e81d9c33d6f37ebc36d6c56 /src/plugins/styles | |
parent | 79f679da9483c12979500dd48bc096d33af9ca6f (diff) | |
parent | 8bebded9ab02b8eec67c44bfddf802d6bf9cda3c (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/plugins/platforms/cocoa/qcocoamenu.h
src/plugins/platforms/cocoa/qcocoamenu.mm
src/plugins/platforms/cocoa/qcocoawindow.mm
src/widgets/styles/qstylehelper_p.h
Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
Diffstat (limited to 'src/plugins/styles')
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 22 | ||||
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac_p_p.h | 8 | ||||
-rw-r--r-- | src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h | 6 | ||||
-rw-r--r-- | src/plugins/styles/windowsvista/qwindowsxpstyle.cpp | 12 |
4 files changed, 37 insertions, 11 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index a6ece7632a..4bcfa75f36 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -82,7 +82,9 @@ #include <qpainter.h> #include <qpixmapcache.h> #include <qpointer.h> +#if QT_CONFIG(progressbar) #include <qprogressbar.h> +#endif #if QT_CONFIG(pushbutton) #include <qpushbutton.h> #endif @@ -90,11 +92,15 @@ #if QT_CONFIG(rubberband) #include <qrubberband.h> #endif +#if QT_CONFIG(scrollbar) #include <qscrollbar.h> +#endif #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 @@ -112,7 +118,9 @@ #endif #include <qmath.h> #include <QtWidgets/qgraphicsproxywidget.h> +#if QT_CONFIG(graphicsview) #include <QtWidgets/qgraphicsview.h> +#endif #include <QtCore/qvariant.h> #include <private/qstylehelper_p.h> #include <private/qstyleanimation_p.h> @@ -781,13 +789,13 @@ 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 else if (qobject_cast<const QSlider *>(widg)) ct = QStyle::CT_Slider; -#ifndef QT_NO_PROGRESSBAR +#if QT_CONFIG(progressbar) else if (qobject_cast<const QProgressBar *>(widg)) ct = QStyle::CT_ProgressBar; #endif @@ -916,7 +924,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg if (sz == QStyleHelper::SizeSmall) { 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) { @@ -1003,7 +1011,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg ret.setWidth(w); break; } -#ifndef QT_NO_PROGRESSBAR +#if QT_CONFIG(progressbar) case QStyle::CT_ProgressBar: { int finalValue = -1; Qt::Orientation orient = Qt::Horizontal; @@ -3336,7 +3344,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai HIThemeGroupBoxDrawInfo gdi; gdi.version = qt_mac_hitheme_version; gdi.state = tds; -#ifndef QT_NO_GROUPBOX +#if QT_CONFIG(groupbox) if (w && qobject_cast<QGroupBox *>(w->parentWidget())) gdi.kind = kHIThemeGroupBoxKindSecondary; else @@ -5901,7 +5909,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex #endif } break; -#ifndef QT_NO_DIAL +#if QT_CONFIG(dial) case CC_Dial: if (const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(opt)) QStyleHelper::drawDial(dial, p); @@ -6721,7 +6729,7 @@ bool QMacStyle::event(QEvent *e) if(e->type() == QEvent::FocusIn) { QWidget *f = 0; QWidget *focusWidget = QApplication::focusWidget(); -#ifndef QT_NO_GRAPHICSVIEW +#if QT_CONFIG(graphicsview) if (QGraphicsView *graphicsView = qobject_cast<QGraphicsView *>(focusWidget)) { QGraphicsItem *focusItem = graphicsView->scene() ? graphicsView->scene()->focusItem() : 0; if (focusItem && focusItem->type() == QGraphicsProxyWidget::Type) { diff --git a/src/plugins/styles/mac/qmacstyle_mac_p_p.h b/src/plugins/styles/mac/qmacstyle_mac_p_p.h index 8574a52a87..b453e3c2d7 100644 --- a/src/plugins/styles/mac/qmacstyle_mac_p_p.h +++ b/src/plugins/styles/mac/qmacstyle_mac_p_p.h @@ -68,7 +68,9 @@ #include <qevent.h> #include <qfocusframe.h> #include <qformlayout.h> +#if QT_CONFIG(groupbox) #include <qgroupbox.h> +#endif #include <qhash.h> #include <qheaderview.h> #include <qlayout.h> @@ -83,7 +85,9 @@ #include <qpainter.h> #include <qpixmapcache.h> #include <qpointer.h> +#if QT_CONFIG(progressbar) #include <qprogressbar.h> +#endif #if QT_CONFIG(pushbutton) #include <qpushbutton.h> #endif @@ -93,12 +97,16 @@ #endif #include <qsizegrip.h> #include <qspinbox.h> +#if QT_CONFIG(splitter) #include <qsplitter.h> +#endif #include <qstyleoption.h> #include <qtextedit.h> #include <qtextstream.h> #include <qtoolbar.h> +#if QT_CONFIG(toolbutton) #include <qtoolbutton.h> +#endif #if QT_CONFIG(treeview) #include <qtreeview.h> #endif diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h b/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h index 14af2c6bbc..a6744ff915 100644 --- a/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h +++ b/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h @@ -67,14 +67,20 @@ #include <qradiobutton.h> #include <qlineedit.h> #include <qgroupbox.h> +#if QT_CONFIG(toolbutton) #include <qtoolbutton.h> +#endif #include <qspinbox.h> #include <qtoolbar.h> #if QT_CONFIG(combobox) #include <qcombobox.h> #endif +#if QT_CONFIG(scrollbar) #include <qscrollbar.h> +#endif +#if QT_CONFIG(progressbar) #include <qprogressbar.h> +#endif #if QT_CONFIG(dockwidget) #include <qdockwidget.h> #endif diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp index a3a665f22b..9880edf0b4 100644 --- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp @@ -55,14 +55,18 @@ #include <qpa/qplatformnativeinterface.h> #include <qdesktopwidget.h> +#if QT_CONFIG(toolbutton) #include <qtoolbutton.h> +#endif #if QT_CONFIG(tabbar) #include <qtabbar.h> #endif #if QT_CONFIG(combobox) #include <qcombobox.h> #endif +#if QT_CONFIG(scrollbar) #include <qscrollbar.h> +#endif #include <qheaderview.h> #include <qspinbox.h> #if QT_CONFIG(listview) @@ -2857,7 +2861,7 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo } break; #endif -#ifndef QT_NO_TOOLBUTTON +#if QT_CONFIG(toolbutton) case CC_ToolButton: if (const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { @@ -2971,7 +2975,7 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo } } break; -#endif // QT_NO_TOOLBUTTON +#endif // QT_CONFIG(toolbutton) case CC_TitleBar: { @@ -3231,12 +3235,12 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo } break; #endif //QT_NO_MDIAREA -#ifndef QT_NO_DIAL +#if QT_CONFIG(dial) case CC_Dial: if (const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(option)) QStyleHelper::drawDial(dial, p); break; -#endif // QT_NO_DIAL +#endif // QT_CONFIG(dial) default: QWindowsStyle::drawComplexControl(cc, option, p, widget); break; |