path: root/src/corelib/json
diff options
authorSze Howe Koh <>2014-02-15 11:54:53 +0800
committerThe Qt Project <>2014-02-25 16:36:34 +0100
commitb648195c314ab0b342e5883ba13efbdc7104fd9e (patch)
tree5bd23368d7e37abf28fccfc7eaa9d43fb3c40a0e /src/corelib/json
parent6a7747f30cc853f07501770a8704fee215eea322 (diff)
Doc: Replace obsolete types with their newer counterparts
This patch ignores: - Docs for obsolete types themselves - Comparisons between new and obsolete types Change-Id: Id9b1e628255113e7c44520abe0f8a4e0db4a283d Reviewed-by: Jerome Pasion <>
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()