summaryrefslogtreecommitdiffstats
path: root/src/corelib/json/qjsonarray.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-08-15 15:41:44 +0200
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-08-25 16:03:42 +0200
commit7dce96220003e3fa3f932341aaecd8e7f55f4d95 (patch)
treea8bafd0eca632b98f84b2a1f8b5424d8a13dccf0 /src/corelib/json/qjsonarray.cpp
parentf16de5c1fd8cf0e9d6a37aaa771144ccc4220fba (diff)
Add operator-> to QJson iterators
The iterators for QJsonArray and QJsonObject are currently lacking an operator-> definition. Unfortunately it is not possible to do in clean way without redefining either the iterators or QJsonValueRef class. This patch instead adds two fake pointer classes that are only used to handle the operator-> return value. Task-number: QTBUG-29573 Change-Id: Ief785a6afbbedc9e89cf3b6f3958c2c755997a66 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/json/qjsonarray.cpp')
-rw-r--r--src/corelib/json/qjsonarray.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/json/qjsonarray.cpp b/src/corelib/json/qjsonarray.cpp
index c1e831192a..6f3a960f05 100644
--- a/src/corelib/json/qjsonarray.cpp
+++ b/src/corelib/json/qjsonarray.cpp
@@ -746,6 +746,11 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
from which you got the reference.
*/
+/*! \fn QJsonValueRef *QJsonArray::iterator::operator->() const
+
+ Returns a pointer to a modifiable reference to the current item.
+*/
+
/*! \fn QJsonValueRef QJsonArray::iterator::operator[](int j) const
Returns a modifiable reference to the item at offset \a j from the
@@ -971,6 +976,11 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
Returns the current item.
*/
+/*! \fn QJsonValue *QJsonArray::const_iterator::operator->() const
+
+ Returns a pointer to the current item.
+*/
+
/*! \fn QJsonValue QJsonArray::const_iterator::operator[](int j) const
Returns the item at offset \a j from the item pointed to by this iterator (the item at