diff options
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 9 | ||||
-rw-r--r-- | src/corelib/kernel/qmetatype_p.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 8 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.h | 8 |
5 files changed, 26 insertions, 3 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 754f5a13e4..356a675517 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -47,7 +47,9 @@ #include "qstringlist.h" #include "qvector.h" #include "qlocale.h" +#if QT_CONFIG(easingcurve) #include "qeasingcurve.h" +#endif #include "quuid.h" #include "qvariant.h" #include "qdatastream.h" diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index a6c90fc3ed..d41f7ee80e 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -94,6 +94,13 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId(); #define QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(F)\ F(VoidStar, 31, void*) \ +#if QT_CONFIG(easingcurve) +#define QT_FOR_EACH_STATIC_EASINGCURVE(F)\ + F(QEasingCurve, 29, QEasingCurve) +#else +#define QT_FOR_EACH_STATIC_EASINGCURVE(F) +#endif + #if QT_CONFIG(itemmodel) #define QT_FOR_EACH_STATIC_ITEMMODEL_CLASS(F)\ F(QModelIndex, 42, QModelIndex) \ @@ -122,7 +129,7 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId(); F(QPoint, 25, QPoint) \ F(QPointF, 26, QPointF) \ F(QRegExp, 27, QRegExp) \ - F(QEasingCurve, 29, QEasingCurve) \ + QT_FOR_EACH_STATIC_EASINGCURVE(F) \ F(QUuid, 30, QUuid) \ F(QVariant, 41, QVariant) \ F(QRegularExpression, 44, QRegularExpression) \ diff --git a/src/corelib/kernel/qmetatype_p.h b/src/corelib/kernel/qmetatype_p.h index fa7208369a..d743d5a5c7 100644 --- a/src/corelib/kernel/qmetatype_p.h +++ b/src/corelib/kernel/qmetatype_p.h @@ -206,7 +206,9 @@ template<> struct TypeDefinition<QCborArray> { static const bool IsAvailable = f template<> struct TypeDefinition<QCborMap> { static const bool IsAvailable = false; }; template<> struct TypeDefinition<QCborSimpleType> { static const bool IsAvailable = false; }; template<> struct TypeDefinition<QCborValue> { static const bool IsAvailable = false; }; +#if QT_CONFIG(easingcurve) template<> struct TypeDefinition<QEasingCurve> { static const bool IsAvailable = false; }; +#endif template<> struct TypeDefinition<QJsonArray> { static const bool IsAvailable = false; }; template<> struct TypeDefinition<QJsonDocument> { static const bool IsAvailable = false; }; template<> struct TypeDefinition<QJsonObject> { static const bool IsAvailable = false; }; diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 511dc3c81c..43a3fb1db0 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -46,7 +46,9 @@ #include "qdebug.h" #include "qmap.h" #include "qdatetime.h" +#if QT_CONFIG(easingcurve) #include "qeasingcurve.h" +#endif #include "qlist.h" #if QT_CONFIG(regularexpression) #include "qregularexpression.h" @@ -2194,7 +2196,7 @@ QVariant::QVariant(const QTime &val) QVariant::QVariant(const QDateTime &val) : d(DateTime) { v_construct<QDateTime>(&d, val); } -#ifndef QT_BOOTSTRAPPED +#if QT_CONFIG(easingcurve) QVariant::QVariant(const QEasingCurve &val) : d(EasingCurve) { v_construct<QEasingCurve>(&d, val); } @@ -2471,7 +2473,9 @@ static const ushort mapIdFromQt3ToCurrent[MapFromThreeCount] = QVariant::Pen, QVariant::LongLong, QVariant::ULongLong, +#if QT_CONFIG(easingcurve) QVariant::EasingCurve +#endif }; /*! @@ -2788,7 +2792,7 @@ QDateTime QVariant::toDateTime() const \sa canConvert(int targetTypeId), convert() */ -#ifndef QT_BOOTSTRAPPED +#if QT_CONFIG(easingcurve) QEasingCurve QVariant::toEasingCurve() const { return qVariantToHelper<QEasingCurve>(d, handlerManager); diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 39b7e4c0ce..e7d3d9c835 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -66,7 +66,9 @@ class QBitArray; class QDataStream; class QDate; class QDateTime; +#if QT_CONFIG(easingcurve) class QEasingCurve; +#endif class QLine; class QLineF; class QLocale; @@ -162,7 +164,9 @@ class Q_CORE_EXPORT QVariant RegExp = QMetaType::QRegExp, RegularExpression = QMetaType::QRegularExpression, Hash = QMetaType::QVariantHash, +#if QT_CONFIG(easingcurve) EasingCurve = QMetaType::QEasingCurve, +#endif Uuid = QMetaType::QUuid, #if QT_CONFIG(itemmodel) ModelIndex = QMetaType::QModelIndex, @@ -254,7 +258,9 @@ class Q_CORE_EXPORT QVariant #endif // QT_CONFIG(regularexpression) #ifndef QT_BOOTSTRAPPED QVariant(const QUrl &url); +#if QT_CONFIG(easingcurve) QVariant(const QEasingCurve &easing); +#endif QVariant(const QUuid &uuid); QVariant(const QJsonValue &jsonValue); QVariant(const QJsonObject &jsonObject); @@ -328,7 +334,9 @@ class Q_CORE_EXPORT QVariant #endif // QT_CONFIG(regularexpression) #ifndef QT_BOOTSTRAPPED QUrl toUrl() const; +#if QT_CONFIG(easingcurve) QEasingCurve toEasingCurve() const; +#endif QUuid toUuid() const; QJsonValue toJsonValue() const; QJsonObject toJsonObject() const; |