diff options
Diffstat (limited to 'src/declarative/qml/qmlobjectscriptclass.cpp')
-rw-r--r-- | src/declarative/qml/qmlobjectscriptclass.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/declarative/qml/qmlobjectscriptclass.cpp b/src/declarative/qml/qmlobjectscriptclass.cpp index 4ff4746..7bbb7df 100644 --- a/src/declarative/qml/qmlobjectscriptclass.cpp +++ b/src/declarative/qml/qmlobjectscriptclass.cpp @@ -144,23 +144,7 @@ QmlObjectScriptClass::queryProperty(QObject *obj, const Identifier &name, return 0; QmlEnginePrivate *enginePrivate = QmlEnginePrivate::get(engine); - - QmlPropertyCache *cache = 0; - QmlDeclarativeData *ddata = QmlDeclarativeData::get(obj); - if (ddata) - cache = ddata->propertyCache; - if (!cache) { - cache = enginePrivate->cache(obj); - if (cache && ddata) { cache->addref(); ddata->propertyCache = cache; } - } - - if (cache) { - lastData = cache->property(name); - } else { - local = QmlPropertyCache::create(obj->metaObject(), toString(name)); - if (local.isValid()) - lastData = &local; - } + lastData = QmlPropertyCache::property(engine, obj, name, local); if (lastData) return QScriptClass::HandlesReadAccess | QScriptClass::HandlesWriteAccess; |