diff options
Diffstat (limited to 'src/widgets/itemviews/qitemeditorfactory.cpp')
-rw-r--r-- | src/widgets/itemviews/qitemeditorfactory.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp index a31689e0b5..54b7c6666f 100644 --- a/src/widgets/itemviews/qitemeditorfactory.cpp +++ b/src/widgets/itemviews/qitemeditorfactory.cpp @@ -41,9 +41,9 @@ #include "qitemeditorfactory.h" #include "qitemeditorfactory_p.h" -#ifndef QT_NO_ITEMVIEWS - +#if QT_CONFIG(combobox) #include <qcombobox.h> +#endif #if QT_CONFIG(datetimeedit) #include <qdatetimeedit.h> #endif @@ -52,6 +52,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 +64,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_COMBOBOX +#if QT_CONFIG(combobox) class QBooleanComboBox : public QComboBox { @@ -75,7 +77,7 @@ public: bool value() const; }; -#endif // QT_NO_COMBOBOX +#endif // QT_CONFIG(combobox) #ifndef QT_NO_SPINBOX @@ -234,7 +236,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 +302,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 +597,7 @@ void QExpandingLineEdit::resizeToContents() #endif // QT_NO_LINEEDIT -#ifndef QT_NO_COMBOBOX +#if QT_CONFIG(combobox) QBooleanComboBox::QBooleanComboBox(QWidget *parent) : QComboBox(parent) @@ -614,14 +616,12 @@ 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 #include "moc_qitemeditorfactory_p.cpp" - -#endif // QT_NO_ITEMVIEWS |