Commit 4a318a61 authored by Giuseppe D'Angelo's avatar Giuseppe D'Angelo
Browse files

QJsonObject::(const_)iterator: add pointer typedef


Otherwise they're unusable with std::algorithms or anything else
that requires iterator_traits.

Change-Id: Ia29c1e7c1778844e37d43eaa8aef2871afe3c991
Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
Showing with 12 additions and 0 deletions
......@@ -693,6 +693,11 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
\internal
*/
/*! \typedef QJsonObject::iterator::pointer
\internal
*/
/*! \fn QJsonObject::iterator::iterator()
Constructs an uninitialized iterator.
......@@ -895,6 +900,11 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
\internal
*/
/*! \typedef QJsonObject::const_iterator::pointer
\internal
*/
/*! \fn QJsonObject::const_iterator::const_iterator()
Constructs an uninitialized iterator.
......
......@@ -104,6 +104,7 @@ public:
typedef int difference_type;
typedef QJsonValue value_type;
typedef QJsonValueRef reference;
typedef QJsonValuePtr pointer;
Q_DECL_CONSTEXPR inline iterator() : o(Q_NULLPTR), i(0) {}
Q_DECL_CONSTEXPR inline iterator(QJsonObject *obj, int index) : o(obj), i(index) {}
......@@ -146,6 +147,7 @@ public:
typedef int difference_type;
typedef QJsonValue value_type;
typedef QJsonValue reference;
typedef QJsonValuePtr pointer;
Q_DECL_CONSTEXPR inline const_iterator() : o(Q_NULLPTR), i(0) {}
Q_DECL_CONSTEXPR inline const_iterator(const QJsonObject *obj, int index)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment