summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/json/qjsonvalue.cpp52
1 files changed, 40 insertions, 12 deletions
diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp
index 487a431b8f..e5194f7336 100644
--- a/src/corelib/json/qjsonvalue.cpp
+++ b/src/corelib/json/qjsonvalue.cpp
@@ -343,18 +343,46 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
The conversion will convert QVariant types as follows:
- \list
- \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
- \endlist
+ \table
+ \header
+ \li Source type
+ \li Destination type
+ \row
+ \li
+ \list
+ \li QMetaType::Bool
+ \endlist
+ \li QJsonValue::Bool
+ \row
+ \li
+ \list
+ \li QMetaType::Int
+ \li QMetaType::UInt
+ \li QMetaType::LongLong
+ \li QMetaType::ULongLong
+ \li QMetaType::Double
+ \endlist
+ \li QJsonValue::Double
+ \row
+ \li
+ \list
+ \li QMetaType::QString
+ \endlist
+ \li QJsonValue::String
+ \row
+ \li
+ \list
+ \li QMetaType::QStringList
+ \li QMetaType::QVariantList
+ \endlist
+ \li QJsonValue::Array
+ \row
+ \li
+ \list
+ \li QMetaType::QVariantMap
+ \endlist
+ \li QJsonValue::Object
+ \endtable
For all other QVariant types a conversion to a QString will be attempted. If the returned string
is empty, a Null QJsonValue will be stored, otherwise a String value using the returned QString.