diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-01-27 03:49:12 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-01-27 03:49:12 (GMT) |
commit | d9e4393ef212dba9eeba68277b270d68bcdbc733 (patch) | |
tree | d65ff0df673db66478b081d672f3fe383ae6e5a5 /src/declarative/qml/qdeclarativevme.cpp | |
parent | f15778e60ba538b8715f6433a472ffe08a21d934 (diff) | |
download | Qt-d9e4393ef212dba9eeba68277b270d68bcdbc733.zip Qt-d9e4393ef212dba9eeba68277b270d68bcdbc733.tar.gz Qt-d9e4393ef212dba9eeba68277b270d68bcdbc733.tar.bz2 |
Implement property versioning inside the declarative engine
Task-number: QTBUG-13451
Diffstat (limited to 'src/declarative/qml/qdeclarativevme.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativevme.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp index f3e7809..657b10d 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/declarative/qml/qdeclarativevme.cpp @@ -324,10 +324,12 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack, (void)new QDeclarativeVMEMetaObject(target, &mo, data, comp); - QDeclarativeData *ddata = QDeclarativeData::get(target, true); - if (ddata->propertyCache) ddata->propertyCache->release(); - ddata->propertyCache = propertyCaches.at(instr.storeMeta.propertyCache); - ddata->propertyCache->addref(); + if (instr.storeMeta.propertyCache != -1) { + QDeclarativeData *ddata = QDeclarativeData::get(target, true); + if (ddata->propertyCache) ddata->propertyCache->release(); + ddata->propertyCache = propertyCaches.at(instr.storeMeta.propertyCache); + ddata->propertyCache->addref(); + } } break; @@ -978,6 +980,11 @@ QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData ddata->ownMemory = false; QObjectPrivate::get(rv)->declarativeData = ddata; + if (typePropertyCache && !ddata->propertyCache) { + ddata->propertyCache = typePropertyCache; + ddata->propertyCache->addref(); + } + return rv; } else { Q_ASSERT(component); |