summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-01-17 15:32:27 +0100
committerLars Knoll <lars.knoll@nokia.com>2012-01-18 09:38:35 +0100
commit845eef94ea3c0b9cdfd996f8fdc616568794597e (patch)
tree5e05d1658cce6c10aa12a8fa2d3b91730996462a /src
parentc0598ffc59aad377520008b3078ae6a3d488f35d (diff)
More documentation fixes.
Change-Id: I65f4bb405bbfd846a61e5e79da85fa9a35e59678 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qjsonarray.cpp156
-rw-r--r--src/qjsonobject.cpp111
2 files changed, 132 insertions, 135 deletions
diff --git a/src/qjsonarray.cpp b/src/qjsonarray.cpp
index cdb5fb2..ece6a95 100644
--- a/src/qjsonarray.cpp
+++ b/src/qjsonarray.cpp
@@ -59,14 +59,14 @@ namespace QtJson {
\brief The QJsonArray class encapsulates a JSON array.
- A JSON array is a list values. The list can be manipulated by inserting and
+ A JSON array is a list of values. The list can be manipulated by inserting and
removing QJsonValue's from the array.
- A QJsonArray can be converted from and to a QVariantList, you can query the
- number of entries with size(), insert() and remove() entries from it
- and iterate over it's content using the standard C++ iterator pattern.
+ A QJsonArray can be converted to and from a QVariantList. You can query the
+ number of entries with size(), insert(), and remove() entries from it
+ and iterate over its content using the standard C++ iterator pattern.
- QJsonArray is an implicitly shared class, and shares the data with the document
+ QJsonArray is an implicitly shared class and shares the data with the document
it has been created from as long as it is not being modified.
*/
@@ -88,7 +88,7 @@ QJsonArray::QJsonArray(Private::Data *data, Private::Array *array)
}
/*!
- Deletes the array
+ Deletes the array.
*/
QJsonArray::~QJsonArray()
{
@@ -175,8 +175,7 @@ QVariantList QJsonArray::toVariantList() const
/*!
- \returns the size of this object, ie. the number of
- values stored in it.
+ \returns the number of values stored in the array.
*/
int QJsonArray::size() const
{
@@ -187,7 +186,7 @@ int QJsonArray::size() const
}
/*!
- \returns true if the object is empty. This is the same as size() == 0.
+ \returns \c true if the object is empty. This is the same as size() == 0.
\sa size
*/
@@ -202,7 +201,7 @@ bool QJsonArray::isEmpty() const
/*!
\returns a QJsonValue representing the value for index \a i.
- The returned QJsonValue is Undefined, if i is out of bounds.
+ The returned QJsonValue is \c Undefined, if \a i is out of bounds.
*/
QJsonValue QJsonArray::at(int i) const
@@ -216,7 +215,7 @@ QJsonValue QJsonArray::at(int i) const
/*!
Returns the first value stored in the array.
- Same as at(0).
+ Same as \c at(0).
\sa at
*/
@@ -228,7 +227,7 @@ QJsonValue QJsonArray::first() const
/*!
Returns the last value stored in the array.
- Same as at(size() - 1).
+ Same as \c{at(size() - 1)}.
\sa at
*/
@@ -240,7 +239,7 @@ QJsonValue QJsonArray::last() const
/*!
Inserts \a value at the beginning of the array.
- This is the same as array.insert(0, \a value).
+ This is the same as \c{insert(0, \a value)}.
\sa append(), insert()
*/
@@ -261,7 +260,7 @@ void QJsonArray::append(const QJsonValue &value)
/*!
Removes the value at index position \a i. \a i must be a valid
- index position in the array (i.e., 0 <= \a i < size()).
+ index position in the array (i.e., \c{0 <= \a i < size()}).
\sa insert(), replace()
*/
@@ -280,7 +279,7 @@ void QJsonArray::removeAt(int i)
/*! \fn void QJsonArray::removeFirst()
Removes the first item in the array. Calling this function is
- equivalent to calling removeAt(0). The array must not be empty. If
+ equivalent to calling \c{removeAt(0)}. The array must not be empty. If
the array can be empty, call isEmpty() before calling this
function.
@@ -290,7 +289,7 @@ void QJsonArray::removeAt(int i)
/*! \fn void QJsonArray::removeLast()
Removes the last item in the array. Calling this function is
- equivalent to calling removeAt(size() - 1). The array must not be
+ equivalent to calling \c{removeAt(size() - 1)}. The array must not be
empty. If the array can be empty, call isEmpty() before calling
this function.
@@ -299,7 +298,7 @@ void QJsonArray::removeAt(int i)
/*!
Removes the item at index position \a i and returns it. \a i must
- be a valid index position in the array (i.e., 0 <= \a i < size()).
+ be a valid index position in the array (i.e., \c{0 <= \a i < size()}).
If you don't use the return value, removeAt() is more efficient.
@@ -322,7 +321,7 @@ QJsonValue QJsonArray::takeAt(int i)
/*!
Inserts \a value at index position \a i in the array. If \a i
- is 0, the value is prepended to the array. If \a i is size(), the
+ is \c 0, the value is prepended to the array. If \a i is size(), the
value is appended to the array.
\sa append(), prepend(), replace(), removeAt()
@@ -351,7 +350,7 @@ void QJsonArray::insert(int i, const QJsonValue &value)
/*!
Replaces the item at index position \a i with \a value. \a i must
- be a valid index position in the array (i.e., 0 <= \a i < size()).
+ be a valid index position in the array (i.e., \c{0 <= \a i < size()}).
\sa operator[](), removeAt()
*/
@@ -382,7 +381,7 @@ void QJsonArray::replace(int i, const QJsonValue &value)
}
/*!
- Returns true if the array contains an occurrence of \a value, otherwise false.
+ Returns \c true if the array contains an occurrence of \a value, otherwise \c false.
\sa count()
*/
@@ -397,14 +396,14 @@ bool QJsonArray::contains(const QJsonValue &value) const
/*!
Returns the value at index position \a i as a modifiable reference.
- \a i must be a valid index position in the array (i.e., 0 <= \a i <
- size()).
+ \a i must be a valid index position in the array (i.e., \c{0 <= \a 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
- use it as if it were 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.
+ 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.
\sa at(), value()
*/
@@ -425,7 +424,7 @@ QJsonValue QJsonArray::operator[](int i) const
}
/*!
- Returns true if this array is equal to \a other.
+ Returns \c true if this array is equal to \a other.
*/
bool QJsonArray::operator==(const QJsonArray &other) const
{
@@ -447,7 +446,7 @@ bool QJsonArray::operator==(const QJsonArray &other) const
}
/*!
- Returns true if this array is not equal to \a other.
+ Returns \c true if this array is not equal to \a other.
*/
bool QJsonArray::operator!=(const QJsonArray &other) const
{
@@ -525,7 +524,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn bool QJsonArray::empty() const
This function is provided for STL compatibility. It is equivalent
- to isEmpty() and returns true if the array is empty.
+ to isEmpty() and returns \c true if the array is empty.
*/
/*! \class QJsonArray::iterator
@@ -534,10 +533,10 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
QJsonArray::iterator allows you to iterate over a QJsonArray
and to modify the array item associated with the
iterator. If you want to iterate over a const QJsonArray, use
- QJsonArray::const_iterator instead. It is generally good practice to
+ QJsonArray::const_iterator instead. It is generally a good practice to
use QJsonArray::const_iterator on a non-const QJsonArray as well, unless
you need to change the QJsonArray through the iterator. Const
- iterators are slightly faster, and can improve code readability.
+ iterators are slightly faster and improves code readability.
The default QJsonArray::iterator constructor creates an uninitialized
iterator. You must initialize it using a QJsonArray function like
@@ -558,7 +557,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \typedef QJsonArray::iterator::iterator_category
- A synonym for \e {std::random_access_iterator_tag} indicating
+ A synonym for \i {std::random_access_iterator_tag} indicating
this iterator is a random access iterator.
*/
@@ -602,24 +601,23 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
The return value is of type QJsonValueRef, a helper class for QJsonArray
and QJsonObject. When you get an object of type QJsonValueRef, you can
- use it as if it were 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.
+ 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.
*/
/*! \fn QJsonValueRef QJsonArray::iterator::operator[](int j) const
- Returns a modifiable reference to the item at position *this +
- \a{j}.
+ Returns a modifiable reference to the item at position \c{*this + j}.
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
- use it as if it were 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.
+ 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.
\sa operator+()
*/
@@ -628,8 +626,8 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\fn bool QJsonArray::iterator::operator==(const iterator &other) const
\fn bool QJsonArray::iterator::operator==(const const_iterator &other) const
- Returns true if \a other points to the same item as this
- iterator; otherwise returns false.
+ Returns \c true if \a other points to the same item as this
+ iterator; otherwise returns \c false.
\sa operator!=()
*/
@@ -638,8 +636,8 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\fn bool QJsonArray::iterator::operator!=(const iterator &other) const
\fn bool QJsonArray::iterator::operator!=(const const_iterator &other) const
- Returns true if \a other points to a different item than this
- iterator; otherwise returns false.
+ Returns \c true if \a other points to a different item than this
+ iterator; otherwise returns \c false.
\sa operator==()
*/
@@ -648,7 +646,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\fn bool QJsonArray::iterator::operator<(const iterator& other) const
\fn bool QJsonArray::iterator::operator<(const const_iterator& other) const
- Returns true if the item pointed to by this iterator is less than
+ Returns \c true if the item pointed to by this iterator is less than
the item pointed to by the \a other iterator.
*/
@@ -656,7 +654,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\fn bool QJsonArray::iterator::operator<=(const iterator& other) const
\fn bool QJsonArray::iterator::operator<=(const const_iterator& other) const
- Returns true if the item pointed to by this iterator is less than
+ Returns \c true if the item pointed to by this iterator is less than
or equal to the item pointed to by the \a other iterator.
*/
@@ -664,7 +662,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\fn bool QJsonArray::iterator::operator>(const iterator& other) const
\fn bool QJsonArray::iterator::operator>(const const_iterator& other) const
- Returns true if the item pointed to by this iterator is greater
+ Returns \c true if the item pointed to by this iterator is greater
than the item pointed to by the \a other iterator.
*/
@@ -672,13 +670,13 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\fn bool QJsonArray::iterator::operator>=(const iterator& other) const
\fn bool QJsonArray::iterator::operator>=(const const_iterator& other) const
- Returns true if the item pointed to by this iterator is greater
+ Returns \c true if the item pointed to by this iterator is greater
than or equal to the item pointed to by the \a other iterator.
*/
/*! \fn QJsonArray::iterator &QJsonArray::iterator::operator++()
- The prefix ++ operator (\c{++it}) advances the iterator to the
+ The prefix ++ operator, \c{++it}, advances the iterator to the
next item in the array and returns an iterator to the new current
item.
@@ -691,14 +689,14 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\overload
- The postfix ++ operator (\c{it++}) advances the iterator to the
+ The postfix ++ operator, \c{it++}, advances the iterator to the
next item in the array and returns an iterator to the previously
current item.
*/
/*! \fn QJsonArray::iterator &QJsonArray::iterator::operator--()
- The prefix -- operator (\c{--it}) makes the preceding item
+ The prefix -- operator, \c{--it}, makes the preceding item
current and returns an iterator to the new current item.
Calling this function on QJsonArray::begin() leads to undefined results.
@@ -710,22 +708,22 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\overload
- The postfix -- operator (\c{it--}) makes the preceding item
+ The postfix -- operator, \c{it--}, makes the preceding item
current and returns an iterator to the previously current item.
*/
/*! \fn QJsonArray::iterator &QJsonArray::iterator::operator+=(int j)
- Advances the iterator by \a j items. (If \a j is negative, the
- iterator goes backward.)
+ Advances the iterator by \a j items. If \a j is negative, the
+ iterator goes backward.
\sa operator-=(), operator+()
*/
/*! \fn QJsonArray::iterator &QJsonArray::iterator::operator-=(int j)
- Makes the iterator go back by \a j items. (If \a j is negative,
- the iterator goes forward.)
+ Makes the iterator go back by \a j items. If \a j is negative,
+ the iterator goes forward.
\sa operator+=(), operator-()
*/
@@ -733,7 +731,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn QJsonArray::iterator QJsonArray::iterator::operator+(int j) const
Returns an iterator to the item at \a j positions forward from
- this iterator. (If \a j is negative, the iterator goes backward.)
+ this iterator. If \a j is negative, the iterator goes backward.
\sa operator-(), operator+=()
*/
@@ -741,7 +739,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn QJsonArray::iterator QJsonArray::iterator::operator-(int j) const
Returns an iterator to the item at \a j positions backward from
- this iterator. (If \a j is negative, the iterator goes forward.)
+ this iterator. If \a j is negative, the iterator goes forward.
\sa operator+(), operator-=()
*/
@@ -757,10 +755,10 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
QJsonArray::const_iterator allows you to iterate over a
QJsonArray. If you want to modify the QJsonArray as
- you iterate over it, use QJsonArray::iterator instead. It is generally
+ you iterate over it, use QJsonArray::iterator instead. It is generally a
good practice to use QJsonArray::const_iterator on a non-const QJsonArray
as well, unless you need to change the QJsonArray through the
- iterator. Const iterators are slightly faster, and can improve
+ iterator. Const iterators are slightly faster and improves
code readability.
The default QJsonArray::const_iterator constructor creates an
@@ -793,7 +791,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \typedef QJsonArray::const_iterator::iterator_category
- A synonym for \e {std::random_access_iterator_tag} indicating
+ A synonym for \i {std::random_access_iterator_tag} indicating
this iterator is a random access iterator.
*/
@@ -829,7 +827,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn QJsonValue QJsonArray::const_iterator::operator[](int j) const
- Returns the item at position *this + \a{j}.
+ Returns the item at position \c{*this + j}.
This function is provided to make QJsonArray iterators behave like C++
pointers.
@@ -839,16 +837,16 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn bool QJsonArray::const_iterator::operator==(const const_iterator &other) const
- Returns true if \a other points to the same item as this
- iterator; otherwise returns false.
+ Returns \c true if \a other points to the same item as this
+ iterator; otherwise returns \c false.
\sa operator!=()
*/
/*! \fn bool QJsonArray::const_iterator::operator!=(const const_iterator &other) const
- Returns true if \a other points to a different item than this
- iterator; otherwise returns false.
+ Returns \c true if \a other points to a different item than this
+ iterator; otherwise returns \c false.
\sa operator==()
*/
@@ -856,34 +854,34 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*!
\fn bool QJsonArray::const_iterator::operator<(const const_iterator& other) const
- Returns true if the item pointed to by this iterator is less than
+ Returns \c true if the item pointed to by this iterator is less than
the item pointed to by the \a other iterator.
*/
/*!
\fn bool QJsonArray::const_iterator::operator<=(const const_iterator& other) const
- Returns true if the item pointed to by this iterator is less than
+ Returns \c true if the item pointed to by this iterator is less than
or equal to the item pointed to by the \a other iterator.
*/
/*!
\fn bool QJsonArray::const_iterator::operator>(const const_iterator& other) const
- Returns true if the item pointed to by this iterator is greater
+ Returns \c true if the item pointed to by this iterator is greater
than the item pointed to by the \a other iterator.
*/
/*!
\fn bool QJsonArray::const_iterator::operator>=(const const_iterator& other) const
- Returns true if the item pointed to by this iterator is greater
+ Returns \c true if the item pointed to by this iterator is greater
than or equal to the item pointed to by the \a other iterator.
*/
/*! \fn QJsonArray::const_iterator &QJsonArray::const_iterator::operator++()
- The prefix ++ operator (\c{++it}) advances the iterator to the
+ The prefix ++ operator, \c{++it}, advances the iterator to the
next item in the array and returns an iterator to the new current
item.
@@ -896,14 +894,14 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\overload
- The postfix ++ operator (\c{it++}) advances the iterator to the
+ The postfix ++ operator, \c{it++}, advances the iterator to the
next item in the array and returns an iterator to the previously
current item.
*/
/*! \fn QJsonArray::const_iterator &QJsonArray::const_iterator::operator--()
- The prefix -- operator (\c{--it}) makes the preceding item
+ The prefix -- operator, \c{--it}, makes the preceding item
current and returns an iterator to the new current item.
Calling this function on QJsonArray::begin() leads to undefined results.
@@ -915,22 +913,22 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\overload
- The postfix -- operator (\c{it--}) makes the preceding item
+ The postfix -- operator, \c{it--}, makes the preceding item
current and returns an iterator to the previously current item.
*/
/*! \fn QJsonArray::const_iterator &QJsonArray::const_iterator::operator+=(int j)
- Advances the iterator by \a j items. (If \a j is negative, the
- iterator goes backward.)
+ Advances the iterator by \a j items. If \a j is negative, the
+ iterator goes backward.
\sa operator-=(), operator+()
*/
/*! \fn QJsonArray::const_iterator &QJsonArray::const_iterator::operator-=(int j)
- Makes the iterator go back by \a j items. (If \a j is negative,
- the iterator goes forward.)
+ Makes the iterator go back by \a j items. If \a j is negative,
+ the iterator goes forward.
\sa operator+=(), operator-()
*/
@@ -938,7 +936,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn QJsonArray::const_iterator QJsonArray::const_iterator::operator+(int j) const
Returns an iterator to the item at \a j positions forward from
- this iterator. (If \a j is negative, the iterator goes backward.)
+ this iterator. If \a j is negative, the iterator goes backward.
\sa operator-(), operator+=()
*/
@@ -946,7 +944,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn QJsonArray::const_iterator QJsonArray::const_iterator::operator-(int j) const
Returns an iterator to the item at \a j positions backward from
- this iterator. (If \a j is negative, the iterator goes forward.)
+ this iterator. If \a j is negative, the iterator goes forward.
\sa operator+(), operator-=()
*/
diff --git a/src/qjsonobject.cpp b/src/qjsonobject.cpp
index ba8acb2..27a1173 100644
--- a/src/qjsonobject.cpp
+++ b/src/qjsonobject.cpp
@@ -60,9 +60,9 @@ namespace QtJson {
A JSON object is a list of key value pairs, where the keys are unique strings
and the values are represented by a QJsonValue.
- A QJsonObject can be converted from and to a QVariantMap, you can query the
- number of key/value pairs with size(), insert() and remove() entries from it
- and iterate over it's content using the standard C++ iterator pattern.
+ A QJsonObject can be converted to and from a QVariantMap. You can query the
+ number of (key, value) pairs with size(), insert(), and remove() entries from it
+ and iterate over its content using the standard C++ iterator pattern.
QJsonObject is an implicitly shared class, and shares the data with the document
it has been created from as long as it is not being modified.
@@ -103,7 +103,7 @@ QJsonObject::~QJsonObject()
Creates a copy of \a other.
Since QJsonObject is implicitly shared, the copy is shallow
- as long as the object doesn't get modified.
+ as long as the object does not get modified.
*/
QJsonObject::QJsonObject(const QJsonObject &other)
{
@@ -182,8 +182,7 @@ QStringList QJsonObject::keys() const
}
/*!
- \returns the size of this object, ie. the number of
- key/value pairs stored in it.
+ \returns the the number of (key, value) pairs stored in the object.
*/
int QJsonObject::size() const
{
@@ -194,7 +193,7 @@ int QJsonObject::size() const
}
/*!
- \returns true if the object is empty. This is the same as size() == 0.
+ \returns \c true if the object is empty. This is the same as size() == 0.
\sa size
*/
@@ -209,7 +208,7 @@ bool QJsonObject::isEmpty() const
/*!
\returns a QJsonValue representing the value for the key \a key.
- The returned QJsonValue is Undefined, if the key does not exist.
+ The returned QJsonValue is \c Undefined, if the key does not exist.
\sa setValue, QJsonValue, QJsonValue::isUndefined
*/
@@ -229,7 +228,7 @@ QJsonValue QJsonObject::value(const QString &key) const
This does the same as value().
- The returned QJsonValue is Undefined, if the key does not exist.
+ The returned QJsonValue is \c Undefined, if the key does not exist.
\sa value, setValue, QJsonValue, QJsonValue::isUndefined
*/
@@ -243,9 +242,9 @@ QJsonValue QJsonObject::operator [](const QString &key) const
The return value is of type QJsonValueRef, a helper class for QJsonArray
and QJsonObject. When you get an object of type QJsonValueRef, you can
- use it as if it were 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.
+ 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.
\sa setValue, value
*/
@@ -264,7 +263,7 @@ QJsonValueRef QJsonObject::operator [](const QString &key)
/*!
Inserts a new item with the key \a key and a value of \a value.
- If there is already an item with the key \a key, that item's value
+ If there is already an item with the key \a key then that item's value
is replaced with \a value.
\returns an iterator pointing to the inserted item.
@@ -361,7 +360,7 @@ QJsonValue QJsonObject::take(const QString &key)
}
/*!
- \returns true if the object contains key \a key.
+ \returns \c true if the object contains key \a key.
\sa insert, remove, take
*/
@@ -374,7 +373,7 @@ bool QJsonObject::contains(const QString &key) const
}
/*!
- \returns true if \a other is equal to this object
+ \returns \c true if \a other is equal to this object
*/
bool QJsonObject::operator==(const QJsonObject &other) const
{
@@ -399,7 +398,7 @@ bool QJsonObject::operator==(const QJsonObject &other) const
}
/*!
- \returns true if \a other is not equal to this object
+ \returns \c true if \a other is not equal to this object
*/
bool QJsonObject::operator!=(const QJsonObject &other) const
{
@@ -518,8 +517,8 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
\fn bool QJsonObject::empty() const
This function is provided for STL compatibility. It is equivalent
- to isEmpty(), returning true if the object is empty; otherwise
- returning false.
+ to isEmpty(), returning \c true if the object is empty; otherwise
+ returning \c false.
*/
/*! \class QJsonObject::iterator
@@ -531,7 +530,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
should use QJsonObject::const_iterator. It is generally good practice to
use QJsonObject::const_iterator on a non-const QJsonObject as well, unless you
need to change the QJsonObject through the iterator. Const iterators are
- slightly faster, and can improve code readability.
+ slightly faster, and improves code readability.
The default QJsonObject::iterator constructor creates an uninitialized
iterator. You must initialize it using a QJsonObject function like
@@ -551,7 +550,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \typedef QJsonObject::iterator::iterator_category
- A synonym for \e {std::bidirectional_iterator_tag} indicating
+ A synonym for \i {std::bidirectional_iterator_tag} indicating
this iterator is a bidirectional iterator.
*/
@@ -596,9 +595,9 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
The return value is of type QJsonValueRef, a helper class for QJsonArray
and QJsonObject. When you get an object of type QJsonValueRef, you can
- use it as if it were 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.
+ 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.
\sa key(), operator*()
*/
@@ -611,9 +610,9 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
The return value is of type QJsonValueRef, a helper class for QJsonArray
and QJsonObject. When you get an object of type QJsonValueRef, you can
- use it as if it were 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.
+ 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.
\sa key()
*/
@@ -622,8 +621,8 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
\fn bool QJsonObject::iterator::operator==(const iterator &other) const
\fn bool QJsonObject::iterator::operator==(const const_iterator &other) const
- Returns true if \a other points to the same item as this
- iterator; otherwise returns false.
+ Returns \c true if \a other points to the same item as this
+ iterator; otherwise returns \c false.
\sa operator!=()
*/
@@ -632,15 +631,15 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
\fn bool QJsonObject::iterator::operator!=(const iterator &other) const
\fn bool QJsonObject::iterator::operator!=(const const_iterator &other) const
- Returns true if \a other points to a different item than this
- iterator; otherwise returns false.
+ Returns \c true if \a other points to a different item than this
+ iterator; otherwise returns \c false.
\sa operator==()
*/
/*! \fn QJsonObject::iterator QJsonObject::iterator::operator++()
- The prefix ++ operator (\c{++i}) advances the iterator to the
+ The prefix ++ operator, \c{++i}, advances the iterator to the
next item in the object and returns an iterator to the new current
item.
@@ -653,14 +652,14 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
\overload
- The postfix ++ operator (\c{i++}) advances the iterator to the
+ The postfix ++ operator, \c{i++}, advances the iterator to the
next item in the object and returns an iterator to the previously
current item.
*/
/*! \fn QJsonObject::iterator QJsonObject::iterator::operator--()
- The prefix -- operator (\c{--i}) makes the preceding item
+ The prefix -- operator, \c{--i}, makes the preceding item
current and returns an iterator pointing to the new current item.
Calling this function on QJsonObject::begin() leads to undefined
@@ -673,7 +672,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
\overload
- The postfix -- operator (\c{i--}) makes the preceding item
+ The postfix -- operator, \c{i--}, makes the preceding item
current and returns an iterator pointing to the previously
current item.
*/
@@ -681,7 +680,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn QJsonObject::iterator QJsonObject::iterator::operator+(int j) const
Returns an iterator to the item at \a j positions forward from
- this iterator. (If \a j is negative, the iterator goes backward.)
+ this iterator. If \a j is negative, the iterator goes backward.
\sa operator-()
@@ -690,23 +689,23 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn QJsonObject::iterator QJsonObject::iterator::operator-(int j) const
Returns an iterator to the item at \a j positions backward from
- this iterator. (If \a j is negative, the iterator goes forward.)
+ this iterator. If \a j is negative, the iterator goes forward.
\sa operator+()
*/
/*! \fn QJsonObject::iterator &QJsonObject::iterator::operator+=(int j)
- Advances the iterator by \a j items. (If \a j is negative, the
- iterator goes backward.)
+ Advances the iterator by \a j items. If \a j is negative, the
+ iterator goes backward.
\sa operator-=(), operator+()
*/
/*! \fn QJsonObject::iterator &QJsonObject::iterator::operator-=(int j)
- Makes the iterator go back by \a j items. (If \a j is negative,
- the iterator goes forward.)
+ Makes the iterator go back by \a j items. If \a j is negative,
+ the iterator goes forward.
\sa operator+=(), operator-()
*/
@@ -719,7 +718,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
over it, you must use QJsonObject::iterator instead. It is generally
good practice to use QJsonObject::const_iterator on a non-const QJsonObject as
well, unless you need to change the QJsonObject through the iterator.
- Const iterators are slightly faster, and can improve code
+ Const iterators are slightly faster and improves code
readability.
The default QJsonObject::const_iterator constructor creates an
@@ -740,7 +739,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \typedef QJsonObject::const_iterator::iterator_category
- A synonym for \e {std::bidirectional_iterator_tag} indicating
+ A synonym for \i {std::bidirectional_iterator_tag} indicating
this iterator is a bidirectional iterator.
*/
@@ -795,23 +794,23 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn bool QJsonObject::const_iterator::operator==(const const_iterator &other) const
- Returns true if \a other points to the same item as this
- iterator; otherwise returns false.
+ Returns \c true if \a other points to the same item as this
+ iterator; otherwise returns \c false.
\sa operator!=()
*/
/*! \fn bool QJsonObject::const_iterator::operator!=(const const_iterator &other) const
- Returns true if \a other points to a different item than this
- iterator; otherwise returns false.
+ Returns \c true if \a other points to a different item than this
+ iterator; otherwise returns \c false.
\sa operator==()
*/
/*! \fn QJsonObject::const_iterator QJsonObject::const_iterator::operator++()
- The prefix ++ operator (\c{++i}) advances the iterator to the
+ The prefix ++ operator, \c{++i}, advances the iterator to the
next item in the object and returns an iterator to the new current
item.
@@ -824,14 +823,14 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
\overload
- The postfix ++ operator (\c{i++}) advances the iterator to the
+ The postfix ++ operator, \c{i++}, advances the iterator to the
next item in the object and returns an iterator to the previously
current item.
*/
/*! \fn QJsonObject::const_iterator &QJsonObject::const_iterator::operator--()
- The prefix -- operator (\c{--i}) makes the preceding item
+ The prefix -- operator, \c{--i}, makes the preceding item
current and returns an iterator pointing to the new current item.
Calling this function on QJsonObject::begin() leads to undefined
@@ -844,7 +843,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
\overload
- The postfix -- operator (\c{i--}) makes the preceding item
+ The postfix -- operator, \c{i--}, makes the preceding item
current and returns an iterator pointing to the previously
current item.
*/
@@ -852,7 +851,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn QJsonObject::const_iterator QJsonObject::const_iterator::operator+(int j) const
Returns an iterator to the item at \a j positions forward from
- this iterator. (If \a j is negative, the iterator goes backward.)
+ this iterator. If \a j is negative, the iterator goes backward.
This operation can be slow for large \a j values.
@@ -862,7 +861,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn QJsonObject::const_iterator QJsonObject::const_iterator::operator-(int j) const
Returns an iterator to the item at \a j positions backward from
- this iterator. (If \a j is negative, the iterator goes forward.)
+ this iterator. If \a j is negative, the iterator goes forward.
This operation can be slow for large \a j values.
@@ -871,8 +870,8 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn QJsonObject::const_iterator &QJsonObject::const_iterator::operator+=(int j)
- Advances the iterator by \a j items. (If \a j is negative, the
- iterator goes backward.)
+ Advances the iterator by \a j items. If \a j is negative, the
+ iterator goes backward.
This operation can be slow for large \a j values.
@@ -881,8 +880,8 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn QJsonObject::const_iterator &QJsonObject::const_iterator::operator-=(int j)
- Makes the iterator go back by \a j items. (If \a j is negative,
- the iterator goes forward.)
+ Makes the iterator go back by \a j items. If \a j is negative,
+ the iterator goes forward.
This operation can be slow for large \a j values.