summaryrefslogtreecommitdiffstats
path: root/src/corelib/json
diff options
context:
space:
mode:
authorNico Vertriest <nico.vertriest@digia.com>2015-01-21 15:42:19 +0100
committerNico Vertriest <nico.vertriest@digia.com>2015-02-24 08:44:13 +0000
commit1afe110b8fe6da51ec23736fa3a105013255f904 (patch)
tree8b732f317ec952bd51214f71becbce4713452e50 /src/corelib/json
parentd5f55d9870543050ab6d9078d5dab8de0ab15c24 (diff)
Doc: corrected link/autolink issues in corelib
Task-number: QTBUG-43115 Change-Id: I31da92e3a7c4dd7b75ee283dbfecd77e284978ca Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/corelib/json')
-rw-r--r--src/corelib/json/qjsonarray.cpp13
-rw-r--r--src/corelib/json/qjsonvalue.cpp18
2 files changed, 23 insertions, 8 deletions
diff --git a/src/corelib/json/qjsonarray.cpp b/src/corelib/json/qjsonarray.cpp
index acbd7dda8f..c3420b21b2 100644
--- a/src/corelib/json/qjsonarray.cpp
+++ b/src/corelib/json/qjsonarray.cpp
@@ -531,8 +531,8 @@ bool QJsonArray::contains(const QJsonValue &value) const
\a i must be a valid index position in the array (i.e., \c{0 <= i <
size()}).
- The return value is of type QJsonValueRef, a helper class for QJsonArray
- and QJsonObject. When you get an object of type QJsonValueRef, you can
+ The return value is of type \keyword QJsonValueRef, a helper class for QJsonArray
+ and QJsonObject. When you get an object of type \keyword QJsonValueRef, you can
use it as if it were a reference to a QJsonValue. If you assign to it,
the assignment will apply to the character in the QJsonArray of QJsonObject
from which you got the reference.
@@ -731,13 +731,14 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn QJsonValueRef QJsonArray::iterator::operator*() const
+
Returns a modifiable reference to the current item.
You can change the value of an item by using operator*() on the
left side of an assignment.
- The return value is of type QJsonValueRef, a helper class for QJsonArray
- and QJsonObject. When you get an object of type QJsonValueRef, you can
+ The return value is of type \keyword QJsonValueRef, a helper class for QJsonArray
+ and QJsonObject. When you get an object of type \keyword QJsonValueRef, you can
use it as if it were a reference to a QJsonValue. If you assign to it,
the assignment will apply to the character in the QJsonArray of QJsonObject
from which you got the reference.
@@ -756,8 +757,8 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
This function is provided to make QJsonArray iterators behave like C++
pointers.
- The return value is of type QJsonValueRef, a helper class for QJsonArray
- and QJsonObject. When you get an object of type QJsonValueRef, you can
+ The return value is of type \keyword QJsonValueRef, a helper class for QJsonArray
+ and QJsonObject. When you get an object of type \keyword QJsonValueRef, you can
use it as if it were a reference to a QJsonValue. If you assign to it,
the assignment will apply to the character in the QJsonArray of QJsonObject
from which you got the reference.
diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp
index ac4fcb89c1..6d0b3aa5d8 100644
--- a/src/corelib/json/qjsonvalue.cpp
+++ b/src/corelib/json/qjsonvalue.cpp
@@ -74,6 +74,20 @@ QT_BEGIN_NAMESPACE
conversions. This implies that converting to a type that is not stored in the value will return a default
constructed return value.
+ \section1 QJsonValueRef
+
+ QJsonValueRef is a helper class for QJsonArray and QJsonObject.
+ When you get an object of type QJsonValueRef, you can
+ use it as if it were a reference to a QJsonValue. If you assign to it,
+ the assignment will apply to the element in the QJsonArray or QJsonObject
+ from which you got the reference.
+
+ The following methods return QJsonValueRef:
+ \list
+ \li \l {QJsonArray}::operator[](int i)
+ \li \l {QJsonObject}::operator[](const QString & key) const
+ \endlist
+
\sa {JSON Support in Qt}, {JSON Save Game Example}
*/
@@ -416,13 +430,13 @@ QJsonValue QJsonValue::fromVariant(const QVariant &variant)
The QJsonValue types will be converted as follows:
- \value Null {QVariant::}{QVariant()}
+ \value Null \l {QVariant::}{QVariant()}
\value Bool QMetaType::Bool
\value Double QMetaType::Double
\value String QString
\value Array QVariantList
\value Object QVariantMap
- \value Undefined {QVariant::}{QVariant()}
+ \value Undefined \l {QVariant::}{QVariant()}
\sa fromVariant()
*/