summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-07-22 15:16:51 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-07-25 11:23:45 +0000
commit163863f77d891f56573e4dae316d16cfc2fefc8f (patch)
treeb4d909413d084babd124e614df55e333f4d07b45 /src/widgets/itemviews
parent3ade30a2af5b64cb2437d214f25e4dcbfa00c49d (diff)
Convert features.combobox to QT_[REQUIRE_]CONFIG
Change-Id: I2f415de8556289a6461a645d559be17089c43c99 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp
index a31689e0b5..dcfe4065a6 100644
--- a/src/widgets/itemviews/qitemeditorfactory.cpp
+++ b/src/widgets/itemviews/qitemeditorfactory.cpp
@@ -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