diff options
Diffstat (limited to 'src/qml/qml/qqmlcomponentattached_p.h')
-rw-r--r-- | src/qml/qml/qqmlcomponentattached_p.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/qml/qml/qqmlcomponentattached_p.h b/src/qml/qml/qqmlcomponentattached_p.h index eb6d35652b..b94d474d1f 100644 --- a/src/qml/qml/qqmlcomponentattached_p.h +++ b/src/qml/qml/qqmlcomponentattached_p.h @@ -71,24 +71,33 @@ public: QQmlComponentAttached(QObject *parent = nullptr); ~QQmlComponentAttached(); - void add(QQmlComponentAttached **a) { - prev = a; next = *a; *a = this; - if (next) next->prev = &next; + void insertIntoList(QQmlComponentAttached **listHead) + { + m_prev = listHead; + m_next = *listHead; + *listHead = this; + if (m_next) + m_next->m_prev = &m_next; } - void rem() { - if (next) next->prev = prev; - *prev = next; - next = nullptr; prev = nullptr; + + void removeFromList() + { + *m_prev = m_next; + if (m_next) + m_next->m_prev = m_prev; + m_next = nullptr; + m_prev = nullptr; } - QQmlComponentAttached **prev; - QQmlComponentAttached *next; + + QQmlComponentAttached *next() const { return m_next; } Q_SIGNALS: void completed(); void destruction(); private: - friend class QQmlContextData; + QQmlComponentAttached **m_prev; + QQmlComponentAttached *m_next; }; QT_END_NAMESPACE |