summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-08-21 12:16:40 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-08-24 09:37:42 +0200
commit7127bf1d044e8e0ceb24347be98c7c504c501107 (patch)
tree32f67c0c687d2f2bcabe19c2742fe16c21013aaf
parent3fdc08b42267bf69970b696afe9a29d04dd73fdf (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>
-rw-r--r--src/corelib/kernel/qvariant.cpp28
-rw-r--r--src/corelib/kernel/qvariant.h6
2 files changed, 17 insertions, 17 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;
}
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 0854711e1a..997b7ddd4a 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -587,11 +587,11 @@ public:
{
private:
QtMetaTypePrivate::QSequentialIterableImpl m_impl;
- QAtomicInt *ref;
+ QAtomicInt *m_ref;
friend class QSequentialIterable;
- explicit const_iterator(const QSequentialIterable &iter, QAtomicInt *ref_);
+ explicit const_iterator(const QSequentialIterable &iter, QAtomicInt *ref);
- explicit const_iterator(const QtMetaTypePrivate::QSequentialIterableImpl &impl, QAtomicInt *ref_);
+ explicit const_iterator(const QtMetaTypePrivate::QSequentialIterableImpl &impl, QAtomicInt *ref);
public:
~const_iterator();