diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-11 04:15:30 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-11 04:15:30 (GMT) |
commit | fed8d73b0752b5f737082c534d39f350ca737a7b (patch) | |
tree | 8395c4a7553d4505a481c7669ade38b5c1a46cfd /src/declarative/qml/qmlvme.cpp | |
parent | a57bcdde329ef4c9a71aa6ba714f5e30ffd5dc6d (diff) | |
download | Qt-fed8d73b0752b5f737082c534d39f350ca737a7b.zip Qt-fed8d73b0752b5f737082c534d39f350ca737a7b.tar.gz Qt-fed8d73b0752b5f737082c534d39f350ca737a7b.tar.bz2 |
Move the binding's "mePtr" into QmlAbstractBinding
Now optimizations get deletion protection too.
Diffstat (limited to 'src/declarative/qml/qmlvme.cpp')
-rw-r--r-- | src/declarative/qml/qmlvme.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index fdfeddc..79b1d89 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -541,9 +541,7 @@ QObject *QmlVME::run(QStack<QObject *> &stack, QmlContext *ctxt, QmlCompiledData QmlBinding *bind = new QmlBinding((void *)datas.at(instr.assignBinding.value).constData(), comp, context, ctxt, 0); bindValues.append(bind); - QmlBindingPrivate *p = - static_cast<QmlBindingPrivate *>(QObjectPrivate::get(bind)); - p->mePtr = &bindValues.values[bindValues.count - 1]; + bind->m_mePtr = &bindValues.values[bindValues.count - 1]; bind->addToObject(target); bind->setTarget(mp); @@ -558,7 +556,7 @@ QObject *QmlVME::run(QStack<QObject *> &stack, QmlContext *ctxt, QmlCompiledData new QmlBinding_Id(target, instr.assignIdOptBinding.property, ctxt, instr.assignIdOptBinding.id); bindValues.append(bind); - // ### Need a mePtr + bind->m_mePtr = &bindValues.values[bindValues.count - 1]; bind->addToObject(target); } break; @@ -573,7 +571,7 @@ QObject *QmlVME::run(QStack<QObject *> &stack, QmlContext *ctxt, QmlCompiledData new QmlBinding_ObjProperty(target, instr.assignObjPropBinding.property, context, instr.assignObjPropBinding.contextIdx, instr.assignObjPropBinding.notifyIdx); bindValues.append(bind); - // ### Need a mePtr + bind->m_mePtr = &bindValues.values[bindValues.count - 1]; bind->addToObject(target); } break; |