diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2019-04-14 08:20:31 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2019-06-28 23:05:09 -0700 |
commit | 227c1a56ecb8b99cbd64bd6b8335b3cc3c8a21f1 (patch) | |
tree | 3490c76cac296e9e182650666498a652c3b7307f | |
parent | b321559a22a3ee6490695ecb9d95d3c9fbf7ee1c (diff) |
Move the Item typedef to public in the associative Java iterators
The documentation talks about them. They're just iterators.
Fixes: QTBUG-75123
Change-Id: I194d3f37471a49788a7bfffd15956064b42383b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r-- | src/corelib/tools/qiterator.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qiterator.h b/src/corelib/tools/qiterator.h index 586d26cbad..177a4f1a4c 100644 --- a/src/corelib/tools/qiterator.h +++ b/src/corelib/tools/qiterator.h @@ -115,11 +115,11 @@ template <class Key, class T> \ class Q##C##Iterator \ { \ typedef typename Q##C<Key,T>::const_iterator const_iterator; \ - typedef const_iterator Item; \ Q##C<Key,T> c; \ const_iterator i, n; \ inline bool item_exists() const { return n != c.constEnd(); } \ public: \ + typedef const_iterator Item; \ inline Q##C##Iterator(const Q##C<Key,T> &container) \ : c(container), i(c.constBegin()), n(c.constEnd()) {} \ inline Q##C##Iterator &operator=(const Q##C<Key,T> &container) \ @@ -148,11 +148,11 @@ class QMutable##C##Iterator \ { \ typedef typename Q##C<Key,T>::iterator iterator; \ typedef typename Q##C<Key,T>::const_iterator const_iterator; \ - typedef iterator Item; \ Q##C<Key,T> *c; \ iterator i, n; \ inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } \ public: \ + typedef iterator Item; \ inline QMutable##C##Iterator(Q##C<Key,T> &container) \ : c(&container) \ { i = c->begin(); n = c->end(); } \ |