diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-09-02 20:53:49 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-09-12 18:13:08 +0000 |
commit | df99fbdbedec36aecf5ca67d368966b9dfd9e2e9 (patch) | |
tree | 994033de738585fd46d1fb0e0158dc1af9963ef1 /src/widgets/itemviews | |
parent | bef8b905afec924936d7efcf150760ae86cc9e20 (diff) |
Convert features.spinbox to QT_[REQUIRE_]CONFIG
Change-Id: Idecb6927c20ff009795b0ad94bbb7199df98a8f8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r-- | src/widgets/itemviews/qabstractitemdelegate.cpp | 1 | ||||
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 4 | ||||
-rw-r--r-- | src/widgets/itemviews/qitemeditorfactory.cpp | 12 |
3 files changed, 11 insertions, 6 deletions
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp index fd4699409c..265cf6b47c 100644 --- a/src/widgets/itemviews/qabstractitemdelegate.cpp +++ b/src/widgets/itemviews/qabstractitemdelegate.cpp @@ -53,6 +53,7 @@ #include <qtextedit.h> #include <qplaintextedit.h> #include <qapplication.h> +#include <qvalidator.h> #include <private/qtextengine_p.h> #include <private/qabstractitemdelegate_p.h> diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 25587a281d..039b37baa7 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -50,7 +50,9 @@ #include <qtooltip.h> #include <qdatetime.h> #include <qlineedit.h> +#if QT_CONFIG(spinbox) #include <qspinbox.h> +#endif #include <qheaderview.h> #include <qstyleditemdelegate.h> #include <private/qabstractitemview_p.h> @@ -4219,7 +4221,7 @@ QWidget *QAbstractItemViewPrivate::editor(const QModelIndex &index, if (QLineEdit *le = qobject_cast<QLineEdit*>(focusWidget)) le->selectAll(); #endif -#ifndef QT_NO_SPINBOX +#if QT_CONFIG(spinbox) if (QSpinBox *sb = qobject_cast<QSpinBox*>(focusWidget)) sb->selectAll(); else if (QDoubleSpinBox *dsb = qobject_cast<QDoubleSpinBox*>(focusWidget)) 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 <qlabel.h> #endif #include <qlineedit.h> +#if QT_CONFIG(spinbox) #include <qspinbox.h> +#endif #include <qstyle.h> #include <qstyleoption.h> #include <limits.h> @@ -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: |