aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-01-09 16:20:47 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-14 17:21:08 +0100
commit1512b17f8b12f6a898143913cf0bc59f9c361db9 (patch)
treebba5d59b78e479308fff5050b24ab0a45ae29862 /src/qml/qml/qqmlobjectcreator_p.h
parent7f50eca469a24809d6d5812ee94b447966ff81f9 (diff)
[new compiler] Fix scope, binding target and property object for bindings in group properties
Resolve the confusion about _qobject and _qobjectForBindings, use _qobject for all property related bits and _qobjectForBindings is gone, in favor of _scopeObject. Usually they are the same, but in group properties for example, the _scopeObject remains the outter object but the _qobject becomes the object that's returned by the group property, i.e. anchors.fill: parent For that binding, the scope object is the outter object but the _qobject is the value of the anchors property. Then there's binding target, which is revelant for value type properties, where it remains the outter object. In theory one could nest a value type property in a regular group object, in which case _scopeObject would be outter most, _qobject would be the value type wrapper and _bindingTarget would be the group object. Change-Id: Ie3135d951910bf40ece192ab6260d7a9e6e9cdd6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator_p.h')
-rw-r--r--src/qml/qml/qqmlobjectcreator_p.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h
index a8907fb762..3c180c65f7 100644
--- a/src/qml/qml/qqmlobjectcreator_p.h
+++ b/src/qml/qml/qqmlobjectcreator_p.h
@@ -70,8 +70,7 @@ public:
private:
QObject *createInstance(int index, QObject *parent = 0);
- bool populateInstance(int index, QObject *instance, QQmlRefPointer<QQmlPropertyCache> cache,
- QObject *scopeObjectForJavaScript, QQmlPropertyData *valueTypeProperty);
+ bool populateInstance(int index, QObject *instance, QQmlRefPointer<QQmlPropertyCache> cache, QObject *bindingTarget, QQmlPropertyData *valueTypeProperty);
void setupBindings();
bool setPropertyValue(QQmlPropertyData *property, int index, const QV4::CompiledData::Binding *binding);
@@ -97,7 +96,9 @@ private:
QQmlContextData *rootContext;
QObject *_qobject;
- QObject *_qobjectForBindings;
+ QObject *_scopeObject;
+ QObject *_bindingTarget;
+
QQmlPropertyData *_valueTypeProperty; // belongs to _qobjectForBindings's property cache
const QV4::CompiledData::Object *_compiledObject;
QQmlData *_ddata;