summaryrefslogtreecommitdiffstats
path: root/src/corelib/json/qjsonobject.h
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-09-01 11:35:12 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-09-01 11:35:53 +0200
commit2dfc786c26663a2d555a8c8152c5ff95a3b0672e (patch)
treefbf4d41dc1836ffa607e70e2348102066a83855c /src/corelib/json/qjsonobject.h
parentd444bbf110e83c72d0657203896ad3c8a4cb5107 (diff)
parent1812bb968c49d50745ab2b10787320205c54f946 (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Diffstat (limited to 'src/corelib/json/qjsonobject.h')
-rw-r--r--src/corelib/json/qjsonobject.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/corelib/json/qjsonobject.h b/src/corelib/json/qjsonobject.h
index 92dd19af5e..7973b8ab92 100644
--- a/src/corelib/json/qjsonobject.h
+++ b/src/corelib/json/qjsonobject.h
@@ -107,7 +107,6 @@ public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef int difference_type;
typedef QJsonValue value_type;
-// typedef T *pointer;
typedef QJsonValueRef reference;
Q_DECL_CONSTEXPR inline iterator() : o(0), i(0) {}
@@ -116,7 +115,11 @@ public:
inline QString key() const { return o->keyAt(i); }
inline QJsonValueRef value() const { return QJsonValueRef(o, i); }
inline QJsonValueRef operator*() const { return QJsonValueRef(o, i); }
- //inline T *operator->() const { return &concrete(i)->value; }
+#ifdef Q_QDOC
+ inline QJsonValueRef* operator->() const;
+#else
+ inline QJsonValueRefPtr operator->() const { return QJsonValueRefPtr(o, i); }
+#endif
inline bool operator==(const iterator &other) const { return i == other.i; }
inline bool operator!=(const iterator &other) const { return i != other.i; }
@@ -157,7 +160,11 @@ public:
inline QString key() const { return o->keyAt(i); }
inline QJsonValue value() const { return o->valueAt(i); }
inline QJsonValue operator*() const { return o->valueAt(i); }
- //inline const T *operator->() const { return &concrete(i)->value; }
+#ifdef Q_QDOC
+ inline QJsonValue* operator->() const;
+#else
+ inline QJsonValuePtr operator->() const { return QJsonValuePtr(o->valueAt(i)); }
+#endif
inline bool operator==(const const_iterator &other) const { return i == other.i; }
inline bool operator!=(const const_iterator &other) const { return i != other.i; }