From 8b540f68a8404e4b9e3ac65a22c11416a91ee749 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 19 Aug 2013 09:02:27 +0200 Subject: Tidy up QJsonObject documentation. Change-Id: I445e0573c3c4fdb86ef535299a4eb299e225c15d Reviewed-by: Jerome Pasion Reviewed-by: Lars Knoll --- src/corelib/json/qjsonobject.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/corelib/json') diff --git a/src/corelib/json/qjsonobject.cpp b/src/corelib/json/qjsonobject.cpp index 2be9d8891d..43336de2e7 100644 --- a/src/corelib/json/qjsonobject.cpp +++ b/src/corelib/json/qjsonobject.cpp @@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE 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. - You can convert the array to and from text based JSON through QJsonDocument. + You can convert the object to and from text based JSON through QJsonDocument. */ /*! @@ -104,7 +104,7 @@ QT_BEGIN_NAMESPACE /*! - Constructs an empty JSON object + Constructs an empty JSON object. \sa isEmpty() */ @@ -245,7 +245,7 @@ bool QJsonObject::isEmpty() const /*! Returns a QJsonValue representing the value for the key \a key. - The returned QJsonValue is \c Undefined, if the key does not exist. + The returned QJsonValue is QJsonValue::Undefined if the key does not exist. \sa QJsonValue, QJsonValue::isUndefined() */ @@ -266,7 +266,7 @@ QJsonValue QJsonObject::value(const QString &key) const This does the same as value(). - The returned QJsonValue is \c Undefined, if the key does not exist. + The returned QJsonValue is QJsonValue::Undefined if the key does not exist. \sa value(), QJsonValue, QJsonValue::isUndefined() */ @@ -281,7 +281,7 @@ 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 reference to a QJsonValue. If you assign to it, - the assignment will apply to the character in the QJsonArray of QJsonObject + the assignment will apply to the element in the QJsonArray or QJsonObject from which you got the reference. \sa value() @@ -301,13 +301,13 @@ 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 then 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. If the value is QJsonValue::Undefined, it will cause the key to get removed - from the object. The returned iterator will then point to end() + from the object. The returned iterator will then point to end(). \sa remove(), take(), QJsonObject::iterator, end() */ @@ -382,7 +382,7 @@ void QJsonObject::remove(const QString &key) Returns a QJsonValue containing the value referenced by \a key. If \a key was not contained in the object, the returned QJsonValue - is Undefined. + is QJsonValue::Undefined. \sa insert(), remove(), QJsonValue */ @@ -422,7 +422,7 @@ bool QJsonObject::contains(const QString &key) const } /*! - Returns \c 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 { @@ -447,7 +447,7 @@ bool QJsonObject::operator==(const QJsonObject &other) const } /*! - Returns \c 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 { @@ -501,7 +501,7 @@ QJsonObject::iterator QJsonObject::find(const QString &key) */ /*! - Returns an const iterator pointing to the item with key \a key in the + Returns a const iterator pointing to the item with key \a key in the map. If the map contains no item with key \a key, the function @@ -594,7 +594,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 improves code readability. + slightly faster, and improve code readability. The default QJsonObject::iterator constructor creates an uninitialized iterator. You must initialize it using a QJsonObject function like @@ -614,8 +614,8 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const /*! \typedef QJsonObject::iterator::iterator_category - A synonym for \e {std::bidirectional_iterator_tag} indicating - this iterator is a bidirectional iterator. + A synonym for \e {std::bidirectional_iterator_tag} indicating + this iterator is a bidirectional iterator. */ /*! \typedef QJsonObject::iterator::reference @@ -664,7 +664,7 @@ 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 reference to a QJsonValue. If you assign to it, - the assignment will apply to the character in the QJsonArray of QJsonObject + the assignment will apply to the element in the QJsonArray or QJsonObject from which you got the reference. \sa key(), operator*() @@ -679,7 +679,7 @@ 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 reference to a QJsonValue. If you assign to it, - the assignment will apply to the character in the QJsonArray of QJsonObject + the assignment will apply to the element in the QJsonArray or QJsonObject from which you got the reference. \sa key() @@ -788,7 +788,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 improves code + Const iterators are slightly faster and improve code readability. The default QJsonObject::const_iterator constructor creates an @@ -809,8 +809,8 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const /*! \typedef QJsonObject::const_iterator::iterator_category - A synonym for \e {std::bidirectional_iterator_tag} indicating - this iterator is a bidirectional iterator. + A synonym for \e {std::bidirectional_iterator_tag} indicating + this iterator is a bidirectional iterator. */ /*! \typedef QJsonObject::const_iterator::reference -- cgit v1.2.3