summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qiterator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qiterator.h')
-rw-r--r--src/corelib/tools/qiterator.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/corelib/tools/qiterator.h b/src/corelib/tools/qiterator.h
index 3b86edd750..86b78eb522 100644
--- a/src/corelib/tools/qiterator.h
+++ b/src/corelib/tools/qiterator.h
@@ -87,12 +87,9 @@ class QMutable##C##Iterator \
public: \
inline QMutable##C##Iterator(Q##C<T> &container) \
: c(&container) \
- { c->setSharable(false); i = c->begin(); n = c->end(); } \
- inline ~QMutable##C##Iterator() \
- { c->setSharable(true); } \
+ { i = c->begin(); n = c->end(); } \
inline QMutable##C##Iterator &operator=(Q##C<T> &container) \
- { c->setSharable(true); c = &container; c->setSharable(false); \
- i = c->begin(); n = c->end(); return *this; } \
+ { c = &container; i = c->begin(); n = c->end(); return *this; } \
inline void toFront() { i = c->begin(); n = c->end(); } \
inline void toBack() { i = c->end(); n = i; } \
inline bool hasNext() const { return c->constEnd() != const_iterator(i); } \
@@ -160,11 +157,9 @@ class QMutable##C##Iterator \
public: \
inline QMutable##C##Iterator(Q##C<Key,T> &container) \
: c(&container) \
- { c->setSharable(false); i = c->begin(); n = c->end(); } \
- inline ~QMutable##C##Iterator() \
- { c->setSharable(true); } \
+ { i = c->begin(); n = c->end(); } \
inline QMutable##C##Iterator &operator=(Q##C<Key,T> &container) \
- { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } \
+ { c = &container; i = c->begin(); n = c->end(); return *this; } \
inline void toFront() { i = c->begin(); n = c->end(); } \
inline void toBack() { i = c->end(); n = c->end(); } \
inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } \