diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-08-02 22:49:38 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-08-02 22:52:32 +0200 |
commit | ee07b912a1768ea0b103544f9eeac41f3cf50cf6 (patch) | |
tree | 15bfa7e4a9c098511c1fc89e2b2c240520b85e2d /src/widgets/itemviews/qitemeditorfactory.cpp | |
parent | 4bfff6a98b59b32605d881a463ad3edc221a7dc8 (diff) | |
parent | a96656a8fb6a3c1fc7765659efff28f807fd0deb (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/plugins/platforms/xcb/qxcbconnection.h
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
src/plugins/styles/mac/qmacstyle_mac.mm
src/widgets/widgets/qdockarealayout.cpp
src/widgets/widgets/qmainwindow.cpp
src/widgets/widgets/qmainwindowlayout.cpp
src/widgets/widgets/qmainwindowlayout_p.h
tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
tests/auto/other/macnativeevents/BLACKLIST
tests/auto/widgets/widgets/qmenu/BLACKLIST
Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
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 |