From df99fbdbedec36aecf5ca67d368966b9dfd9e2e9 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Sat, 2 Sep 2017 20:53:49 +0200 Subject: Convert features.spinbox to QT_[REQUIRE_]CONFIG Change-Id: Idecb6927c20ff009795b0ad94bbb7199df98a8f8 Reviewed-by: Oswald Buddenhagen --- src/widgets/itemviews/qitemeditorfactory.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/widgets/itemviews/qitemeditorfactory.cpp') diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp index 54b7c6666f..4d0175dc6c 100644 --- a/src/widgets/itemviews/qitemeditorfactory.cpp +++ b/src/widgets/itemviews/qitemeditorfactory.cpp @@ -51,7 +51,9 @@ #include #endif #include +#if QT_CONFIG(spinbox) #include +#endif #include #include #include @@ -80,7 +82,7 @@ public: #endif // QT_CONFIG(combobox) -#ifndef QT_NO_SPINBOX +#if QT_CONFIG(spinbox) class QUIntSpinBox : public QSpinBox { @@ -107,7 +109,7 @@ Q_SIGNALS: void uintValueChanged(); }; -#endif // QT_NO_SPINBOX +#endif // QT_CONFIG(spinbox) /*! \class QItemEditorFactory @@ -242,7 +244,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 +276,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); @@ -306,7 +308,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: -- cgit v1.2.3