From: Aaron Kennedy Date: Fri, 30 Sep 2011 00:10:13 +0000 (+1000) Subject: Remove unnecessary members X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=270f4a7d6421b134b26b1aa10e6604b38689d638;p=konrad%2Fqtdeclarative.git Remove unnecessary members Change-Id: I9dcdd2333c42aff8a648d5caaa4411c342923d42 Task-number: QTBUG-21151 Reviewed-on: http://codereview.qt-project.org/5822 Reviewed-by: Aaron Kennedy --- diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp index bf81ae4..f8405be 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/declarative/qml/qdeclarativevme.cpp @@ -116,8 +116,6 @@ void QDeclarativeVME::init(QDeclarativeContextData *ctxt, QDeclarativeCompiledDa rootContext = 0; engine = ctxt->engine; - bindValuesCount = 0; - parserStatusCount = 0; } bool QDeclarativeVME::initDeferred(QObject *object) @@ -151,8 +149,6 @@ bool QDeclarativeVME::initDeferred(QObject *object) rootContext = 0; engine = ctxt->engine; - bindValuesCount = 0; - parserStatusCount = 0; return true; } @@ -1248,31 +1244,28 @@ bool QDeclarativeVME::complete(const Interrupt &interrupt) { ActiveVMERestorer restore(this, QDeclarativeEnginePrivate::get(engine)); - while (bindValuesCount < bindValues.count()) { - if(bindValues.at(bindValuesCount)) { - QDeclarativeAbstractBinding *b = bindValues.at(bindValuesCount); + while (!bindValues.isEmpty()) { + QDeclarativeAbstractBinding *b = bindValues.pop(); + + if(b) { b->m_mePtr = 0; b->setEnabled(true, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); } - ++bindValuesCount; if (interrupt.shouldInterrupt()) return false; } bindValues.deallocate(); - while (parserStatusCount < parserStatus.count()) { - QDeclarativeParserStatus *status = - parserStatus.at(parserStatus.count() - parserStatusCount - 1); + while (!parserStatus.isEmpty()) { + QDeclarativeParserStatus *status = parserStatus.pop(); if (status && status->d) { status->d = 0; status->componentComplete(); } - ++parserStatusCount; - if (interrupt.shouldInterrupt()) return false; } diff --git a/src/declarative/qml/qdeclarativevme_p.h b/src/declarative/qml/qdeclarativevme_p.h index 3d79f9d..80c02b1 100644 --- a/src/declarative/qml/qdeclarativevme_p.h +++ b/src/declarative/qml/qdeclarativevme_p.h @@ -141,8 +141,6 @@ private: QFiniteStack objects; QFiniteStack lists; - int bindValuesCount; - int parserStatusCount; QFiniteStack bindValues; QFiniteStack parserStatus; QDeclarativeContextData *rootContext;