diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-08-21 12:16:40 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-08-24 09:37:42 +0200 |
commit | 7127bf1d044e8e0ceb24347be98c7c504c501107 (patch) | |
tree | 32f67c0c687d2f2bcabe19c2742fe16c21013aaf /src/corelib/kernel/qvariant.cpp | |
parent | 3fdc08b42267bf69970b696afe9a29d04dd73fdf (diff) |
Rename QSequentialIterable::ref
Follow the naming convention and remove workarounds in ctors.
Change-Id: Ic7f9de074edab7db369803612a2a2a4ea3deaf57
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/kernel/qvariant.cpp')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index f4f1015231..1bc676a36c 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2579,16 +2579,16 @@ QSequentialIterable::QSequentialIterable(const QtMetaTypePrivate::QSequentialIte { } -QSequentialIterable::const_iterator::const_iterator(const QSequentialIterable &iter, QAtomicInt *ref_) - : m_impl(iter.m_impl), ref(ref_) +QSequentialIterable::const_iterator::const_iterator(const QSequentialIterable &iter, QAtomicInt *ref) + : m_impl(iter.m_impl), m_ref(ref) { - ref->ref(); + m_ref->ref(); } -QSequentialIterable::const_iterator::const_iterator(const QtMetaTypePrivate::QSequentialIterableImpl &impl, QAtomicInt *ref_) - : m_impl(impl), ref(ref_) +QSequentialIterable::const_iterator::const_iterator(const QtMetaTypePrivate::QSequentialIterableImpl &impl, QAtomicInt *ref) + : m_impl(impl), m_ref(ref) { - ref->ref(); + m_ref->ref(); } /*! \fn QSequentialIterable::const_iterator QSequentialIterable::begin() const @@ -2670,9 +2670,9 @@ bool QSequentialIterable::canReverseIterate() const Destroys the QSequentialIterable::const_iterator. */ QSequentialIterable::const_iterator::~const_iterator() { - if (!ref->deref()) { + if (!m_ref->deref()) { m_impl.destroyIter(); - delete ref; + delete m_ref; } } @@ -2680,9 +2680,9 @@ QSequentialIterable::const_iterator::~const_iterator() { Creates a copy of \a other. */ QSequentialIterable::const_iterator::const_iterator(const const_iterator &other) - : m_impl(other.m_impl), ref(other.ref) + : m_impl(other.m_impl), m_ref(other.m_ref) { - ref->ref(); + m_ref->ref(); } /*! @@ -2691,13 +2691,13 @@ QSequentialIterable::const_iterator::const_iterator(const const_iterator &other) QSequentialIterable::const_iterator& QSequentialIterable::const_iterator::operator=(const const_iterator &other) { - other.ref->ref(); - if (!ref->deref()) { + other.m_ref->ref(); + if (!m_ref->deref()) { m_impl.destroyIter(); - delete ref; + delete m_ref; } m_impl = other.m_impl; - ref = other.ref; + m_ref = other.m_ref; return *this; } |