diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-28 03:25:31 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-28 03:25:31 (GMT) |
commit | 1090d5d1fad890d9f43e87e19277e1f624921d6d (patch) | |
tree | 7420c5469b0cc509a67fccab86e434a71faf97ec /src/declarative/qml/qmlparser.cpp | |
parent | 4587282af7bfb9f6b1a8329651073bb4127c62b8 (diff) | |
download | Qt-1090d5d1fad890d9f43e87e19277e1f624921d6d.zip Qt-1090d5d1fad890d9f43e87e19277e1f624921d6d.tar.gz Qt-1090d5d1fad890d9f43e87e19277e1f624921d6d.tar.bz2 |
Delay the compilation of bindings until the end
This way we have a better understanding of the complete context in which the binding will be executed.
Diffstat (limited to 'src/declarative/qml/qmlparser.cpp')
-rw-r--r-- | src/declarative/qml/qmlparser.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlparser.cpp b/src/declarative/qml/qmlparser.cpp index f262b5d..fadfbb1 100644 --- a/src/declarative/qml/qmlparser.cpp +++ b/src/declarative/qml/qmlparser.cpp @@ -83,18 +83,23 @@ const QMetaObject *Object::metaObject() const QmlParser::Property *Object::getDefaultProperty() { - if (!defaultProperty) + if (!defaultProperty) { defaultProperty = new Property; + defaultProperty->parent = this; + } return defaultProperty; } Property *QmlParser::Object::getProperty(const QByteArray &name, bool create) { if (!properties.contains(name)) { - if (create) - properties.insert(name, new Property(name)); - else + if (create) { + Property *property = new Property(name); + property->parent = this; + properties.insert(name, property); + } else { return 0; + } } return properties[name]; } @@ -153,12 +158,12 @@ void QmlParser::Object::dump(int indent) const } QmlParser::Property::Property() -: type(0), index(-1), value(0), isDefault(true) +: parent(0), type(0), index(-1), value(0), isDefault(true) { } QmlParser::Property::Property(const QByteArray &n) -: type(0), index(-1), value(0), name(n), isDefault(false) +: parent(0), type(0), index(-1), value(0), name(n), isDefault(false) { } |