Convert features.combobox to QT_[REQUIRE_]CONFIG

Change-Id: I2f415de8556289a6461a645d559be17089c43c99
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Stephan Binner 2017-07-22 15:16:51 +02:00
parent 3ade30a2af
commit 163863f77d
21 changed files with 91 additions and 69 deletions

View File

@ -48,7 +48,9 @@
#if QT_CONFIG(listview)
#include <QtWidgets/qlistview.h>
#endif
#if QT_CONFIG(combobox)
#include <QtWidgets/qcombobox.h>
#endif
#include <QtSql/qsqldriver.h>
#include <QtSql/qsqlrelationaltablemodel.h>

View File

@ -44,7 +44,9 @@
#include <qevent.h>
#include <qheaderview.h>
#include <qtabbar.h>
#if QT_CONFIG(combobox)
#include <qcombobox.h>
#endif
#include <qlineedit.h>
#include <qstyle.h>
#include <qstyleoption.h>
@ -260,7 +262,7 @@ QString QAccessibleTabBar::text(QAccessible::Text t) const
#endif // QT_NO_TABBAR
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
/*!
\class QAccessibleComboBox
\brief The QAccessibleComboBox class implements the QAccessibleInterface for editable and read-only combo boxes.
@ -378,7 +380,7 @@ QStringList QAccessibleComboBox::keyBindingsForAction(const QString &/*actionNam
return QStringList();
}
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
#ifndef QT_NO_SCROLLAREA
// ======================= QAccessibleAbstractScrollArea =======================

View File

@ -124,7 +124,7 @@ protected:
};
#endif // QT_NO_TABBAR
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
class QAccessibleComboBox : public QAccessibleWidget
{
public:
@ -146,7 +146,7 @@ public:
protected:
QComboBox *comboBox() const;
};
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
#endif // QT_NO_ACCESSIBILITY

View File

@ -79,7 +79,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
else
iface = new QAccessibleLineEdit(widget);
#endif
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
} else if (classname == QLatin1String("QComboBox")) {
iface = new QAccessibleComboBox(widget);
#endif

View File

@ -43,7 +43,9 @@
#ifndef QT_NO_ITEMVIEWS
#if QT_CONFIG(combobox)
#include <qcombobox.h>
#endif
#if QT_CONFIG(datetimeedit)
#include <qdatetimeedit.h>
#endif
@ -52,6 +54,8 @@
#endif
#include <qlineedit.h>
#include <qspinbox.h>
#include <qstyle.h>
#include <qstyleoption.h>
#include <limits.h>
#include <float.h>
#include <qapplication.h>
@ -62,7 +66,7 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
class QBooleanComboBox : public QComboBox
{
@ -75,7 +79,7 @@ public:
bool value() const;
};
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
#ifndef QT_NO_SPINBOX
@ -234,7 +238,7 @@ public:
QWidget *QDefaultItemEditorFactory::createEditor(int userType, QWidget *parent) const
{
switch (userType) {
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case QVariant::Bool: {
QBooleanComboBox *cb = new QBooleanComboBox(parent);
cb->setFrame(false);
@ -300,7 +304,7 @@ QWidget *QDefaultItemEditorFactory::createEditor(int userType, QWidget *parent)
QByteArray QDefaultItemEditorFactory::valuePropertyName(int userType) const
{
switch (userType) {
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case QVariant::Bool:
return "currentIndex";
#endif
@ -595,7 +599,7 @@ void QExpandingLineEdit::resizeToContents()
#endif // QT_NO_LINEEDIT
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
QBooleanComboBox::QBooleanComboBox(QWidget *parent)
: QComboBox(parent)
@ -614,11 +618,11 @@ bool QBooleanComboBox::value() const
return (currentIndex() == 1);
}
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
QT_END_NAMESPACE
#if !defined(QT_NO_LINEEDIT) || !defined(QT_NO_COMBOBOX)
#if !defined(QT_NO_LINEEDIT) || QT_CONFIG(combobox)
#include "qitemeditorfactory.moc"
#endif

View File

@ -2096,7 +2096,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
case CE_HeaderEmptyArea:
p->fillRect(opt->rect, opt->palette.background());
break;
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case CE_ComboBoxLabel:
if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
QRect editRect = proxy()->subControlRect(CC_ComboBox, cb, SC_ComboBoxEditField, widget);
@ -2128,7 +2128,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
p->restore();
}
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
#ifndef QT_NO_TOOLBAR
case CE_ToolBar:
if (const QStyleOptionToolBar *toolBar = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
@ -2505,7 +2505,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
}
break;
#endif // QT_NO_PROGRESSBAR
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case SE_ComboBoxFocusRect:
if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
int margin = cb->frame ? 3 : 0;
@ -2514,7 +2514,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
r = visualRect(opt->direction, opt->rect, r);
}
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
#ifndef QT_NO_TOOLBOX
case SE_ToolBoxTabContents:
r = opt->rect;
@ -3892,7 +3892,7 @@ QStyle::SubControl QCommonStyle::hitTestComplexControl(ComplexControl cc, const
}
}
break;
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case CC_ComboBox:
if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
QRect r;
@ -3907,7 +3907,7 @@ QStyle::SubControl QCommonStyle::hitTestComplexControl(ComplexControl cc, const
}
}
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
#ifndef QT_NO_GROUPBOX
case CC_GroupBox:
if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) {
@ -4140,7 +4140,7 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex
}
break;
#endif // QT_NO_TOOLBUTTON
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case CC_ComboBox:
if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
int x = cb->rect.x(),
@ -4172,7 +4172,7 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex
ret = visualRect(cb->direction, cb->rect, ret);
}
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
case CC_TitleBar:
if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)) {
const int controlMargin = 2;
@ -4839,7 +4839,7 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
sz = QSize(sz.width() + 6, sz.height() + 5);
break;
#endif // QT_NO_TOOLBUTTON
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case CT_ComboBox:
if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
int fw = cmb->frame ? proxy()->pixelMetric(PM_ComboBoxFrameWidth, opt, widget) * 2 : 0;
@ -4849,7 +4849,7 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
sz = QSize(sz.width() + fw + other, sz.height() + fw);
}
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
case CT_HeaderSection:
if (const QStyleOptionHeader *hdr = qstyleoption_cast<const QStyleOptionHeader *>(opt)) {
bool nullIcon = hdr->icon.isNull();

View File

@ -42,7 +42,9 @@
#if QT_CONFIG(style_fusion) || defined(QT_PLUGIN)
#include "qcommonstyle_p.h"
#if QT_CONFIG(combobox)
#include <qcombobox.h>
#endif
#if QT_CONFIG(pushbutton)
#include <qpushbutton.h>
#endif

View File

@ -51,12 +51,14 @@
//#define DEBUG_SIZE_CONSTRAINT
#include <private/qcore_mac_p.h>
#include <private/qcombobox_p.h>
#include <private/qtabbar_p.h>
#include <private/qpainter_p.h>
#include <qapplication.h>
#include <qbitmap.h>
#if QT_CONFIG(combobox)
#include <private/qcombobox_p.h>
#include <qcombobox.h>
#endif
#if QT_CONFIG(dialogbuttonbox)
#include <qdialogbuttonbox.h>
#endif
@ -643,7 +645,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
else if (qobject_cast<const QCheckBox *>(widg))
ct = QStyle::CT_CheckBox;
#endif
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
else if (qobject_cast<const QComboBox *>(widg))
ct = QStyle::CT_ComboBox;
#endif
@ -889,7 +891,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
break;
}
#endif
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case QStyle::CT_LineEdit:
if (!widg || !qobject_cast<QComboBox *>(widg->parentWidget())) {
//should I take into account the font dimentions of the lineedit? -Sam
@ -2264,7 +2266,7 @@ void QMacStyle::polish(QWidget* w)
#ifndef QT_NO_MENU
if (qobject_cast<QMenu*>(w)
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
|| qobject_cast<QComboBoxPrivateContainer *>(w)
#endif
) {
@ -2332,7 +2334,7 @@ void QMacStyle::unpolish(QWidget* w)
w->setWindowOpacity(1.0);
}
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
if (QComboBox *combo = qobject_cast<QComboBox *>(w)) {
if (!combo->isEditable()) {
if (QWidget *widget = combo->findChild<QComboBoxPrivateContainer *>())
@ -4484,7 +4486,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
// Always be normal or disabled to follow the Mac style.
int smallIconSize = proxy()->pixelMetric(PM_SmallIconSize);
QSize iconSize(smallIconSize, smallIconSize);
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
if (const QComboBox *comboBox = qobject_cast<const QComboBox *>(w)) {
iconSize = comboBox->iconSize();
}
@ -5065,7 +5067,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt,
#endif
case SE_LineEditContents:
rect = QCommonStyle::subElementRect(sr, opt, widget);
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
if (widget && qobject_cast<const QComboBox*>(widget->parentWidget()))
rect.adjust(-1, -2, 0, 0);
else
@ -6742,7 +6744,7 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
case QStyle::CT_MenuItem:
if (const QStyleOptionMenuItem *mi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
int maxpmw = mi->maxIconWidth;
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
const QComboBox *comboBox = qobject_cast<const QComboBox *>(widget);
#endif
int w = sz.width(),
@ -6755,7 +6757,7 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
} else {
h = mi->fontMetrics.height() + 2;
if (!mi->icon.isNull()) {
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
if (comboBox) {
const QSize &iconSize = comboBox->iconSize();
h = qMax(h, iconSize.height() + 4);
@ -6776,7 +6778,7 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
w += maxpmw + 6;
// add space for a check. All items have place for a check too.
w += 20;
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
if (comboBox && comboBox->isVisible()) {
QStyleOptionComboBox cmb;
cmb.initFrom(comboBox);

View File

@ -48,7 +48,9 @@
#include "qmacstyle_mac_p.h"
#include "qcommonstyle_p.h"
#include <private/qapplication_p.h>
#if QT_CONFIG(combobox)
#include <private/qcombobox_p.h>
#endif
#include <private/qpainter_p.h>
#include <private/qstylehelper_p.h>
#include <qapplication.h>

View File

@ -52,7 +52,9 @@
#include <QProgressBar>
#include <QSlider>
#include <QEvent>
#if QT_CONFIG(combobox)
#include <QComboBox>
#endif
#include <QAbstractItemView>
#if QT_CONFIG(listview)
#include <QListView>

View File

@ -51,7 +51,9 @@
#include <qstyleoption.h>
#include <qlineedit.h>
#include <private/qwindowsstyle_p.h>
#if QT_CONFIG(combobox)
#include <qcombobox.h>
#endif
#include "private/qcssparser_p.h"
#include "private/qmath_p.h"
#include <qabstractscrollarea.h>
@ -1639,7 +1641,7 @@ int QStyleSheetStyle::nativeFrameWidth(const QWidget *w)
return base->pixelMetric(QStyle::PM_SpinBoxFrameWidth, 0, w);
#endif
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
if (qobject_cast<const QComboBox *>(w))
return base->pixelMetric(QStyle::PM_ComboBoxFrameWidth, 0, w);
#endif
@ -2338,7 +2340,7 @@ QRect QStyleSheetStyle::positionRect(const QWidget *w, const QRenderRule& rule1,
*/
static QWidget *embeddedWidget(QWidget *w)
{
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
if (QComboBox *cmb = qobject_cast<QComboBox *>(w)) {
if (cmb->isEditable())
return cmb->lineEdit();
@ -2372,7 +2374,7 @@ static QWidget *containerWidget(const QWidget *w)
#ifndef QT_NO_LINEEDIT
if (qobject_cast<const QLineEdit *>(w)) {
//if the QLineEdit is an embeddedWidget, we need the rule of the real widget
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
if (qobject_cast<const QComboBox *>(w->parentWidget()))
return w->parentWidget();
#endif
@ -2411,7 +2413,7 @@ static bool unstylable(const QWidget *w)
// detect QComboBoxPrivateContainer
else if (qobject_cast<const QFrame *>(w)) {
if (0
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
|| qobject_cast<const QComboBox *>(w->parentWidget())
#endif
)
@ -2436,7 +2438,7 @@ static quint64 extendedPseudoClass(const QWidget *w)
pc |= ((slider->orientation() == Qt::Vertical) ? PseudoClass_Vertical : PseudoClass_Horizontal);
} else
#endif
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
if (const QComboBox *combo = qobject_cast<const QComboBox *>(w)) {
if (combo->isEditable())
pc |= (combo->isEditable() ? PseudoClass_Editable : PseudoClass_ReadOnly);
@ -3769,7 +3771,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
}
return;
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case CE_ComboBoxLabel:
if (!rule.hasBox())
break;
@ -3805,7 +3807,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
return;
}
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
case CE_Header:
if (hasStyleRule(w, PseudoElement_HeaderViewUpArrow)
@ -5297,7 +5299,7 @@ int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWi
case SH_TabBar_ElideMode: s = QLatin1String("tabbar-elide-mode"); break;
case SH_TabBar_PreferNoArrows: s = QLatin1String("tabbar-prefer-no-arrows"); break;
case SH_ComboBox_PopupFrameStyle:
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
if (qobject_cast<const QComboBox *>(w)) {
QAbstractItemView *view = w->findChild<QAbstractItemView *>();
if (view) {
@ -5307,7 +5309,7 @@ int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWi
return QFrame::NoFrame;
}
}
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
break;
case SH_DialogButtonBox_ButtonsHaveIcons: s = QLatin1String("dialogbuttonbox-buttons-have-icons"); break;
case SH_Workspace_FillSpaceOnMaximize: s = QLatin1String("mdi-fill-space-on-maximize"); break;

View File

@ -1859,7 +1859,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
}
return;
#endif // QT_NO_DOCKWIDGET
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case CE_ComboBoxLabel:
if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
if (cb->state & State_HasFocus) {
@ -1872,7 +1872,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
}
QCommonStyle::drawControl(ce, opt, p, widget);
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
default:
QCommonStyle::drawControl(ce, opt, p, widget);
}
@ -2150,7 +2150,7 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
}
break;
#endif // QT_NO_SCROLLBAR
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case CC_ComboBox:
if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
QBrush editBrush = cmb->palette.brush(QPalette::Base);
@ -2223,7 +2223,7 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
}
}
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
#ifndef QT_NO_SPINBOX
case CC_SpinBox:
if (const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) {

View File

@ -1474,11 +1474,11 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
break;
}
#endif // QT_NO_ITEMVIEWS
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case CE_ComboBoxLabel:
QCommonStyle::drawControl(element, option, painter, widget);
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
default:
QWindowsXPStyle::drawControl(element, option, painter, widget);
break;
@ -2121,7 +2121,7 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt
QRect rect = QWindowsXPStyle::subControlRect(control, option, subControl, widget);
switch (control) {
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case CC_ComboBox:
if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
int x = cb->rect.x(),
@ -2154,7 +2154,7 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt
return rect;
}
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
case CC_TitleBar:
if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(option)) {
if (!buttonVisible(subControl, tb))

View File

@ -72,7 +72,9 @@
#include <qtoolbutton.h>
#include <qspinbox.h>
#include <qtoolbar.h>
#if QT_CONFIG(combobox)
#include <qcombobox.h>
#endif
#include <qscrollbar.h>
#include <qprogressbar.h>
#include <qdockwidget.h>

View File

@ -59,7 +59,9 @@
#include <qdesktopwidget.h>
#include <qtoolbutton.h>
#include <qtabbar.h>
#if QT_CONFIG(combobox)
#include <qcombobox.h>
#endif
#include <qscrollbar.h>
#include <qheaderview.h>
#include <qspinbox.h>
@ -1147,9 +1149,9 @@ void QWindowsXPStyle::polish(QWidget *widget)
#endif
|| qobject_cast<QToolButton*>(widget)
|| qobject_cast<QTabBar*>(widget)
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
|| qobject_cast<QComboBox*>(widget)
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
|| qobject_cast<QScrollBar*>(widget)
|| qobject_cast<QSlider*>(widget)
|| qobject_cast<QHeaderView*>(widget)
@ -1222,9 +1224,9 @@ void QWindowsXPStyle::unpolish(QWidget *widget)
#endif
|| qobject_cast<QToolButton*>(widget)
|| qobject_cast<QTabBar*>(widget)
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
|| qobject_cast<QComboBox*>(widget)
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
|| qobject_cast<QScrollBar*>(widget)
|| qobject_cast<QSlider*>(widget)
|| qobject_cast<QHeaderView*>(widget)
@ -2550,7 +2552,7 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo
}
break;
#endif // QT_NO_SPINBOX
#ifndef QT_NO_COMBOBOX
#if QT_CONFIG(combobox)
case CC_ComboBox:
if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(option))
{
@ -2601,7 +2603,7 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo
}
}
break;
#endif // QT_NO_COMBOBOX
#endif // QT_CONFIG(combobox)
case CC_ScrollBar:
if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(option))
{

View File

@ -39,7 +39,6 @@
#include "qcombobox.h"
#ifndef QT_NO_COMBOBOX
#include <qstylepainter.h>
#include <qpa/qplatformtheme.h>
#include <qpa/qplatformmenu.h>
@ -3486,5 +3485,3 @@ QT_END_NAMESPACE
#include "moc_qcombobox.cpp"
#include "moc_qcombobox_p.cpp"
#endif // QT_NO_COMBOBOX

View File

@ -46,9 +46,9 @@
#include <QtCore/qabstractitemmodel.h>
#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
QT_REQUIRE_CONFIG(combobox);
#ifndef QT_NO_COMBOBOX
QT_BEGIN_NAMESPACE
class QAbstractItemView;
class QLineEdit;
@ -277,8 +277,6 @@ inline void QComboBox::insertItem(int aindex, const QString &atext,
const QVariant &auserData)
{ insertItem(aindex, QIcon(), atext, auserData); }
#endif // QT_NO_COMBOBOX
QT_END_NAMESPACE
#endif // QCOMBOBOX_H

View File

@ -54,7 +54,6 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include "QtWidgets/qcombobox.h"
#ifndef QT_NO_COMBOBOX
#include "QtWidgets/qabstractslider.h"
#include "QtWidgets/qapplication.h"
#include "QtWidgets/qitemdelegate.h"
@ -74,6 +73,8 @@
#include <limits.h>
QT_REQUIRE_CONFIG(combobox);
QT_BEGIN_NAMESPACE
class QAction;
@ -423,6 +424,4 @@ public:
QT_END_NAMESPACE
#endif // QT_NO_COMBOBOX
#endif // QCOMBOBOX_P_H

View File

@ -52,7 +52,6 @@
//
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include "QtWidgets/qcombobox.h"
#include "QtWidgets/qcalendarwidget.h"
#include "QtWidgets/qspinbox.h"
#include "QtWidgets/qtoolbutton.h"

View File

@ -42,7 +42,9 @@
#ifndef QT_NO_TOOLBAR
#include <qapplication.h>
#if QT_CONFIG(combobox)
#include <qcombobox.h>
#endif
#include <qevent.h>
#include <qlayout.h>
#include <qmainwindow.h>

View File

@ -5,8 +5,6 @@ HEADERS += \
widgets/qbuttongroup_p.h \
widgets/qabstractspinbox.h \
widgets/qabstractspinbox_p.h \
widgets/qcombobox.h \
widgets/qcombobox_p.h \
widgets/qdial.h \
widgets/qdockwidget.h \
widgets/qdockwidget_p.h \
@ -66,7 +64,6 @@ HEADERS += \
SOURCES += \
widgets/qbuttongroup.cpp \
widgets/qabstractspinbox.cpp \
widgets/qcombobox.cpp \
widgets/qdial.cpp \
widgets/qdockwidget.cpp \
widgets/qdockarealayout.cpp \
@ -140,6 +137,14 @@ qtConfig(checkbox) {
widgets/qcheckbox.cpp
}
qtConfig(combobox) {
HEADERS += \
widgets/qcombobox.h \
widgets/qcombobox_p.h
SOURCES += widgets/qcombobox.cpp
}
qtConfig(commandlinkbutton) {
HEADERS += \
widgets/qcommandlinkbutton.h