path: root/src/corelib/json
diff options
Diffstat (limited to 'src/corelib/json')
2 files changed, 15 insertions, 15 deletions
diff --git a/src/corelib/json/qjsondocument.cpp b/src/corelib/json/qjsondocument.cpp
index 6e257df39d..90ce8c63a5 100644
--- a/src/corelib/json/qjsondocument.cpp
+++ b/src/corelib/json/qjsondocument.cpp
@@ -260,8 +260,8 @@ QJsonDocument QJsonDocument::fromBinaryData(const QByteArray &data, DataValidati
Creates a QJsonDocument from the QVariant \a variant.
- If the \a variant contains any other type than a QVariant::Map,
- QVariant::List or QVariant::StringList, the returned document
+ If the \a variant contains any other type than a QVariantMap,
+ QVariantList or QStringList, the returned document
document is invalid.
\sa toVariant()
diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp
index c16824ebd2..487a431b8f 100644
--- a/src/corelib/json/qjsonvalue.cpp
+++ b/src/corelib/json/qjsonvalue.cpp
@@ -344,16 +344,16 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
The conversion will convert QVariant types as follows:
- \li QVariant::Bool to Bool
- \li QVariant::Int
- \li QVariant::Double
- \li QVariant::LongLong
- \li QVariant::ULongLong
- \li QVariant::UInt to Double
- \li QVariant::String to String
- \li QVariant::StringList
- \li QVariant::VariantList to Array
- \li QVariant::VariantMap to Object
+ \li QMetaType::Bool to Bool
+ \li QMetaType::Int
+ \li QMetaType::Double
+ \li QMetaType::LongLong
+ \li QMetaType::ULongLong
+ \li QMetaType::UInt to Double
+ \li QMetaType::QString to String
+ \li QMetaType::QStringList
+ \li QMetaType::QVariantList to Array
+ \li QMetaType::QVariantMap to Object
For all other QVariant types a conversion to a QString will be attempted. If the returned string
@@ -395,9 +395,9 @@ QJsonValue QJsonValue::fromVariant(const QVariant &variant)
The QJsonValue types will be converted as follows:
\value Null QVariant()
- \value Bool QVariant::Bool
- \value Double QVariant::Double
- \value String QVariant::String
+ \value Bool QMetaType::Bool
+ \value Double QMetaType::Double
+ \value String QString
\value Array QVariantList
\value Object QVariantMap
\value Undefined QVariant()