diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-02 06:14:27 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-02 06:14:27 (GMT) |
commit | 49bceaf197a5964f244ac094aaa75b35cf3ada49 (patch) | |
tree | 37428a137a608757d4a1c548decf6ff46f1b67f9 /src/declarative/qml/qmlcompiler_p.h | |
parent | ba13a6003d95f9d07f94bdb0e210e0c0453d8b80 (diff) | |
download | Qt-49bceaf197a5964f244ac094aaa75b35cf3ada49.zip Qt-49bceaf197a5964f244ac094aaa75b35cf3ada49.tar.gz Qt-49bceaf197a5964f244ac094aaa75b35cf3ada49.tar.bz2 |
Initial property aliasing support
Currently very basic - the only alias "script" that is allowed is Id.property
Diffstat (limited to 'src/declarative/qml/qmlcompiler_p.h')
-rw-r--r-- | src/declarative/qml/qmlcompiler_p.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcompiler_p.h b/src/declarative/qml/qmlcompiler_p.h index 819c4ad..1c45f57 100644 --- a/src/declarative/qml/qmlcompiler_p.h +++ b/src/declarative/qml/qmlcompiler_p.h @@ -118,6 +118,7 @@ private: int indexForLocation(const QmlParser::LocationSpan &); }; +class QMetaObjectBuilder; class Q_DECLARATIVE_EXPORT QmlCompiler { public: @@ -181,13 +182,19 @@ private: const QMetaProperty &prop, QmlParser::Value *value); - bool compileDynamicMeta(QmlParser::Object *obj); + bool compileDynamicMeta(QmlParser::Object *obj, int preAlias = -1); + bool compileAlias(QMetaObjectBuilder &, + QByteArray &data, + QmlParser::Object *obj, + const QmlParser::Object::DynamicProperty &); bool compileBinding(QmlParser::Value *, QmlParser::Property *prop, const BindingContext &ctxt); - void finalizeComponent(int patch); + bool finalizeComponent(int patch); struct BindingReference; void finalizeBinding(const BindingReference &); + struct AliasReference; + bool finalizeAlias(const AliasReference &); bool canConvert(int, QmlParser::Object *); QStringList deferredProperties(QmlParser::Object *); @@ -199,6 +206,11 @@ private: int idx; }; + struct AliasReference { + QmlParser::Object *object; + int instructionIdx; + }; + struct BindingReference { QmlParser::Variant expression; QmlParser::Property *property; @@ -215,6 +227,7 @@ private: int savedObjects; int pushedProperties; QList<BindingReference> bindings; + QList<AliasReference> aliases; QmlParser::Object *root; }; ComponentCompileState compileState; |