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>
This commit is contained in:
parent
3fdc08b422
commit
7127bf1d04
@ -2579,16 +2579,16 @@ QSequentialIterable::QSequentialIterable(const QtMetaTypePrivate::QSequentialIte
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QSequentialIterable::const_iterator::const_iterator(const QSequentialIterable &iter, QAtomicInt *ref_)
|
QSequentialIterable::const_iterator::const_iterator(const QSequentialIterable &iter, QAtomicInt *ref)
|
||||||
: m_impl(iter.m_impl), ref(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_)
|
QSequentialIterable::const_iterator::const_iterator(const QtMetaTypePrivate::QSequentialIterableImpl &impl, QAtomicInt *ref)
|
||||||
: m_impl(impl), ref(ref_)
|
: m_impl(impl), m_ref(ref)
|
||||||
{
|
{
|
||||||
ref->ref();
|
m_ref->ref();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \fn QSequentialIterable::const_iterator QSequentialIterable::begin() const
|
/*! \fn QSequentialIterable::const_iterator QSequentialIterable::begin() const
|
||||||
@ -2670,9 +2670,9 @@ bool QSequentialIterable::canReverseIterate() const
|
|||||||
Destroys the QSequentialIterable::const_iterator.
|
Destroys the QSequentialIterable::const_iterator.
|
||||||
*/
|
*/
|
||||||
QSequentialIterable::const_iterator::~const_iterator() {
|
QSequentialIterable::const_iterator::~const_iterator() {
|
||||||
if (!ref->deref()) {
|
if (!m_ref->deref()) {
|
||||||
m_impl.destroyIter();
|
m_impl.destroyIter();
|
||||||
delete ref;
|
delete m_ref;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2680,9 +2680,9 @@ QSequentialIterable::const_iterator::~const_iterator() {
|
|||||||
Creates a copy of \a other.
|
Creates a copy of \a other.
|
||||||
*/
|
*/
|
||||||
QSequentialIterable::const_iterator::const_iterator(const const_iterator &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&
|
||||||
QSequentialIterable::const_iterator::operator=(const const_iterator &other)
|
QSequentialIterable::const_iterator::operator=(const const_iterator &other)
|
||||||
{
|
{
|
||||||
other.ref->ref();
|
other.m_ref->ref();
|
||||||
if (!ref->deref()) {
|
if (!m_ref->deref()) {
|
||||||
m_impl.destroyIter();
|
m_impl.destroyIter();
|
||||||
delete ref;
|
delete m_ref;
|
||||||
}
|
}
|
||||||
m_impl = other.m_impl;
|
m_impl = other.m_impl;
|
||||||
ref = other.ref;
|
m_ref = other.m_ref;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,11 +587,11 @@ public:
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
QtMetaTypePrivate::QSequentialIterableImpl m_impl;
|
QtMetaTypePrivate::QSequentialIterableImpl m_impl;
|
||||||
QAtomicInt *ref;
|
QAtomicInt *m_ref;
|
||||||
friend class QSequentialIterable;
|
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:
|
public:
|
||||||
~const_iterator();
|
~const_iterator();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user