diff options
Diffstat (limited to 'src/qml/qml/qqmlvme.cpp')
-rw-r--r-- | src/qml/qml/qqmlvme.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/qml/qml/qqmlvme.cpp b/src/qml/qml/qqmlvme.cpp index c60f4edc80..018769948d 100644 --- a/src/qml/qml/qqmlvme.cpp +++ b/src/qml/qml/qqmlvme.cpp @@ -96,7 +96,7 @@ bool QQmlVME::componentCompleteEnabled() } QQmlVMEGuard::QQmlVMEGuard() -: m_objectCount(0), m_objects(0), m_contextCount(0), m_contexts(0) +: m_objectCount(0), m_objects(nullptr), m_contextCount(0), m_contexts(nullptr) { } @@ -120,27 +120,15 @@ void QQmlVMEGuard::guard(QQmlObjectCreator *creator) m_contexts[0] = creator->parentContextData(); } -void QQmlVMEGuard::unguard(QObject *object) -{ - for (int ii = 0; ii < m_objectCount; ++ii) { - if (m_objects[ii] == object) { - if (ii < m_objectCount - 1) - ::memmove((void *) m_objects[ii], (void *) m_objects[ii + 1], sizeof(QPointer<QObject> *)); - delete m_objects[--m_objectCount]; - break; - } - } -} - void QQmlVMEGuard::clear() { delete [] m_objects; delete [] m_contexts; m_objectCount = 0; - m_objects = 0; + m_objects = nullptr; m_contextCount = 0; - m_contexts = 0; + m_contexts = nullptr; } bool QQmlVMEGuard::isOK() const |