summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcompiledbindings.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-02-08 03:49:09 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-02-08 03:53:03 (GMT)
commit87d71b29a8c4239cb807f13ac9d009cef1ca1a69 (patch)
tree5889e80b9a96bb8b70f44a67d737e5464d2d72d3 /src/declarative/qml/qmlcompiledbindings.cpp
parentf5ad8f76430b43c0a72c1bf41fae1d279948a0e0 (diff)
downloadQt-87d71b29a8c4239cb807f13ac9d009cef1ca1a69.zip
Qt-87d71b29a8c4239cb807f13ac9d009cef1ca1a69.tar.gz
Qt-87d71b29a8c4239cb807f13ac9d009cef1ca1a69.tar.bz2
Allow objects to be shared between QmlEngines
QTBUG-7957
Diffstat (limited to 'src/declarative/qml/qmlcompiledbindings.cpp')
-rw-r--r--src/declarative/qml/qmlcompiledbindings.cpp33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/declarative/qml/qmlcompiledbindings.cpp b/src/declarative/qml/qmlcompiledbindings.cpp
index d09f7eb..cdea96f 100644
--- a/src/declarative/qml/qmlcompiledbindings.cpp
+++ b/src/declarative/qml/qmlcompiledbindings.cpp
@@ -807,36 +807,6 @@ static QObject *variantToQObject(const QVariant &value, bool *ok)
}
}
-QmlPropertyCache::Data *
-QmlCompiledBindingsPrivate::findproperty(QObject *obj,
- const QScriptDeclarativeClass::Identifier &name,
- QmlEnginePrivate *enginePriv,
- QmlPropertyCache::Data &local)
-{
- QmlPropertyCache *cache = 0;
- QmlDeclarativeData *ddata = QmlDeclarativeData::get(obj);
- if (ddata)
- cache = ddata->propertyCache;
- if (!cache) {
- cache = enginePriv->cache(obj);
- if (cache && ddata) { cache->addref(); ddata->propertyCache = cache; }
- }
-
- QmlPropertyCache::Data *property = 0;
-
- if (cache) {
- property = cache->property(name);
- } else {
- qWarning() << "QmlBindingVME: Slow search" << enginePriv->objectClass->toString(name);
- local = QmlPropertyCache::create(obj->metaObject(),
- enginePriv->objectClass->toString(name));
- if (local.isValid())
- property = &local;
- }
-
- return property;
-}
-
bool QmlCompiledBindingsPrivate::findproperty(QObject *obj, Register *output,
QmlEnginePrivate *enginePriv,
int subIdx, const QScriptDeclarativeClass::Identifier &name,
@@ -848,7 +818,8 @@ bool QmlCompiledBindingsPrivate::findproperty(QObject *obj, Register *output,
}
QmlPropertyCache::Data local;
- QmlPropertyCache::Data *property = findproperty(obj, name, enginePriv, local);
+ QmlPropertyCache::Data *property =
+ QmlPropertyCache::property(QmlEnginePrivate::get(enginePriv), obj, name, local);
if (property) {
if (subIdx != -1)