summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qitemeditorfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/itemviews/qitemeditorfactory.cpp')
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp
index b1e9af1f0f..1d8e03569d 100644
--- a/src/widgets/itemviews/qitemeditorfactory.cpp
+++ b/src/widgets/itemviews/qitemeditorfactory.cpp
@@ -50,8 +50,12 @@
#if QT_CONFIG(label)
#include <qlabel.h>
#endif
+#if QT_CONFIG(lineedit)
#include <qlineedit.h>
+#endif
+#if QT_CONFIG(spinbox)
#include <qspinbox.h>
+#endif
#include <qstyle.h>
#include <qstyleoption.h>
#include <limits.h>
@@ -80,7 +84,7 @@ public:
#endif // QT_CONFIG(combobox)
-#ifndef QT_NO_SPINBOX
+#if QT_CONFIG(spinbox)
class QUIntSpinBox : public QSpinBox
{
@@ -107,7 +111,7 @@ Q_SIGNALS:
void uintValueChanged();
};
-#endif // QT_NO_SPINBOX
+#endif // QT_CONFIG(spinbox)
/*!
\class QItemEditorFactory
@@ -242,7 +246,7 @@ QWidget *QDefaultItemEditorFactory::createEditor(int userType, QWidget *parent)
cb->setFrame(false);
return cb; }
#endif
-#ifndef QT_NO_SPINBOX
+#if QT_CONFIG(spinbox)
case QVariant::UInt: {
QSpinBox *sb = new QUIntSpinBox(parent);
sb->setFrame(false);
@@ -274,7 +278,7 @@ QWidget *QDefaultItemEditorFactory::createEditor(int userType, QWidget *parent)
case QVariant::Pixmap:
return new QLabel(parent);
#endif
-#ifndef QT_NO_SPINBOX
+#if QT_CONFIG(spinbox)
case QVariant::Double: {
QDoubleSpinBox *sb = new QDoubleSpinBox(parent);
sb->setFrame(false);
@@ -282,7 +286,7 @@ QWidget *QDefaultItemEditorFactory::createEditor(int userType, QWidget *parent)
sb->setMaximum(DBL_MAX);
return sb; }
#endif
-#ifndef QT_NO_LINEEDIT
+#if QT_CONFIG(lineedit)
case QVariant::String:
default: {
// the default editor is a lineedit
@@ -306,7 +310,7 @@ QByteArray QDefaultItemEditorFactory::valuePropertyName(int userType) const
case QVariant::Bool:
return "currentIndex";
#endif
-#ifndef QT_NO_SPINBOX
+#if QT_CONFIG(spinbox)
case QVariant::UInt:
case QVariant::Int:
case QVariant::Double:
@@ -535,7 +539,7 @@ QItemEditorCreatorBase::~QItemEditorCreatorBase()
\reimp
*/
-#ifndef QT_NO_LINEEDIT
+#if QT_CONFIG(lineedit)
QExpandingLineEdit::QExpandingLineEdit(QWidget *parent)
: QLineEdit(parent), originalWidth(-1), widgetOwnsGeometry(false)
@@ -595,7 +599,7 @@ void QExpandingLineEdit::resizeToContents()
}
}
-#endif // QT_NO_LINEEDIT
+#endif // QT_CONFIG(lineedit)
#if QT_CONFIG(combobox)
@@ -620,7 +624,7 @@ bool QBooleanComboBox::value() const
QT_END_NAMESPACE
-#if !defined(QT_NO_LINEEDIT) || QT_CONFIG(combobox)
+#if QT_CONFIG(lineedit) || QT_CONFIG(combobox)
#include "qitemeditorfactory.moc"
#endif