diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-19 10:17:16 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-28 06:33:48 +0000 |
commit | 26afc5c9b1e74d09840a3dfad3bc145da6ebbcb4 (patch) | |
tree | 3d4cc7095fcf38ffa44c67017fa58116a26c95e4 | |
parent | 8ac1d22ffae7c4079d40569b2ea8c1401ea674f0 (diff) |
Provide conversion between QVariant and QUuid in bootstrap
The classes are there. There is no need for the extra #if-ery.
Change-Id: Ic92ff894d6c9d26dbe32ca83b9501fa8d07e3d44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 43a3fb1db0..705cae6cf4 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2254,10 +2254,10 @@ QVariant::QVariant(const QRegularExpression &re) : d(RegularExpression) { v_construct<QRegularExpression>(&d, re); } #endif // QT_CONFIG(regularexpression) -#ifndef QT_BOOTSTRAPPED QVariant::QVariant(const QUuid &uuid) : d(Uuid) { v_construct<QUuid>(&d, uuid); } +#ifndef QT_BOOTSTRAPPED QVariant::QVariant(const QJsonValue &jsonValue) : d(QMetaType::QJsonValue) { v_construct<QJsonValue>(&d, jsonValue); } @@ -3011,7 +3011,6 @@ QPersistentModelIndex QVariant::toPersistentModelIndex() const } #endif // QT_CONFIG(itemmodel) -#ifndef QT_BOOTSTRAPPED /*! \since 5.0 @@ -3026,6 +3025,7 @@ QUuid QVariant::toUuid() const return qVariantToHelper<QUuid>(d, handlerManager); } +#ifndef QT_BOOTSTRAPPED /*! \since 5.0 diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index e7d3d9c835..86c7414704 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -256,12 +256,12 @@ class Q_CORE_EXPORT QVariant #if QT_CONFIG(regularexpression) QVariant(const QRegularExpression &re); #endif // QT_CONFIG(regularexpression) -#ifndef QT_BOOTSTRAPPED - QVariant(const QUrl &url); #if QT_CONFIG(easingcurve) QVariant(const QEasingCurve &easing); #endif QVariant(const QUuid &uuid); +#ifndef QT_BOOTSTRAPPED + QVariant(const QUrl &url); QVariant(const QJsonValue &jsonValue); QVariant(const QJsonObject &jsonObject); QVariant(const QJsonArray &jsonArray); @@ -332,12 +332,12 @@ class Q_CORE_EXPORT QVariant #if QT_CONFIG(regularexpression) QRegularExpression toRegularExpression() const; #endif // QT_CONFIG(regularexpression) -#ifndef QT_BOOTSTRAPPED - QUrl toUrl() const; #if QT_CONFIG(easingcurve) QEasingCurve toEasingCurve() const; #endif QUuid toUuid() const; +#ifndef QT_BOOTSTRAPPED + QUrl toUrl() const; QJsonValue toJsonValue() const; QJsonObject toJsonObject() const; QJsonArray toJsonArray() const; |