diff options
Diffstat (limited to 'src/corelib/kernel/qvariant.h')
-rw-r--r-- | src/corelib/kernel/qvariant.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 1f35850043..b6d5c1aebd 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -602,6 +602,16 @@ public: ref->ref(); } + inline const_iterator& operator=(const const_iterator &other) + { + if (!m_impl.equal(other.m_impl)) { + m_impl = other.m_impl; + ref = other.ref; + } + ref->ref(); + return *this; + } + inline const QVariant operator*() const { const QtMetaTypePrivate::VariantData d = m_impl.getCurrent(); if (d.metaTypeId == qMetaTypeId<QVariant>()) @@ -671,6 +681,16 @@ public: ref->ref(); } + inline const_iterator& operator=(const const_iterator &other) + { + if (!m_impl.equal(other.m_impl)) { + m_impl = other.m_impl; + ref = other.ref; + } + ref->ref(); + return *this; + } + inline const QVariant key() const { const QtMetaTypePrivate::VariantData d = m_impl.getCurrentKey(); QVariant v(d.metaTypeId, d.data, d.flags); |