diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-03-19 12:29:32 +0100 |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2012-03-19 12:37:03 +0100 |
commit | 4821058f10118be55a541ad39e25ec9165cca3b3 (patch) | |
tree | 167973e3c68fc442b0e37d6f628f3fdbe759f15a /src/quick/qtquick2.cpp | |
parent | 83f11e33745180e9370d484cbcedd0bac020c9dd (diff) | |
parent | 26d5f2e833f0e3686aaa27e695bbfab5fbd808ad (diff) |
Merge master into api_changes
Conflicts:
src/qml/debugger/qqmlenginedebugservice.cpp
src/qml/qml/v8/qv8qobjectwrapper.cpp
src/quick/util/qquickimageprovider.cpp
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
Change-Id: Ie78ba2fabd32f4812bcae9dbdd66ed289dc11dcb
Diffstat (limited to 'src/quick/qtquick2.cpp')
-rw-r--r-- | src/quick/qtquick2.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/quick/qtquick2.cpp b/src/quick/qtquick2.cpp index 621c3ff18e..a97dade106 100644 --- a/src/quick/qtquick2.cpp +++ b/src/quick/qtquick2.cpp @@ -63,7 +63,7 @@ class QQmlQtQuick2DebugStatesDelegate : public QQmlDebugStatesDelegate public: QQmlQtQuick2DebugStatesDelegate(); virtual ~QQmlQtQuick2DebugStatesDelegate(); - virtual void buildStatesList(QQmlContext *ctxt, bool cleanList); + virtual void buildStatesList(bool cleanList, const QList<QPointer<QObject> > &instances); virtual void updateBinding(QQmlContext *context, const QQmlProperty &property, const QVariant &expression, bool isLiteralValue, @@ -90,20 +90,15 @@ QQmlQtQuick2DebugStatesDelegate::~QQmlQtQuick2DebugStatesDelegate() { } -void QQmlQtQuick2DebugStatesDelegate::buildStatesList(QQmlContext *ctxt, bool cleanList) +void QQmlQtQuick2DebugStatesDelegate::buildStatesList(bool cleanList, + const QList<QPointer<QObject> > &instances) { if (cleanList) m_allStates.clear(); - QQmlContextPrivate *ctxtPriv = QQmlContextPrivate::get(ctxt); - for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { - buildStatesList(ctxtPriv->instances.at(ii)); - } - - QQmlContextData *child = QQmlContextData::get(ctxt)->childContexts; - while (child) { - buildStatesList(child->asQQmlContext()); - child = child->nextChild; + //only root context has all instances + for (int ii = 0; ii < instances.count(); ++ii) { + buildStatesList(instances.at(ii)); } } @@ -135,10 +130,11 @@ void QQmlQtQuick2DebugStatesDelegate::updateBinding(QQmlContext *context, QQmlBinding *newBinding = 0; if (!isLiteralValue) { - newBinding = new QQmlBinding(expression.toString(), object, context); + newBinding = new QQmlBinding(expression.toString(), false, object, + QQmlContextData::get(context), fileName, + line, column); newBinding->setTarget(property); newBinding->setNotifyOnValueChanged(true); - newBinding->setSourceLocation(fileName, line, column); } state->changeBindingInRevertList(object, propertyName, newBinding); |