diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-11-11 07:46:20 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-11-11 07:46:20 (GMT) |
commit | 8e5166aba8c8d79e47d4c4fccd5acf52f9cffec6 (patch) | |
tree | f9b91b73e52ec389107cc8791ac76e87f962944b /src/declarative/qml/qmlscriptparser.cpp | |
parent | 6ac7ce79b6041a7c35d08cb28f775dead9701c4b (diff) | |
parent | 0faef2ba318b7df095d5c20fdddd0933ae4912c3 (diff) | |
download | Qt-8e5166aba8c8d79e47d4c4fccd5acf52f9cffec6.zip Qt-8e5166aba8c8d79e47d4c4fccd5acf52f9cffec6.tar.gz Qt-8e5166aba8c8d79e47d4c4fccd5acf52f9cffec6.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts:
src/declarative/util/util.pri
Diffstat (limited to 'src/declarative/qml/qmlscriptparser.cpp')
-rw-r--r-- | src/declarative/qml/qmlscriptparser.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 526894e..b622c24 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -342,10 +342,17 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName, Value *v = new Value; v->object = obj; v->location = obj->location; - if (state.property) + if (state.property) { state.property->addValue(v); - else - state.object->getDefaultProperty()->addValue(v); + } else { + Property *defaultProp = state.object->getDefaultProperty(); + if (defaultProp->location.start.line == -1) { + defaultProp->location = v->location; + defaultProp->location.end = defaultProp->location.start; + defaultProp->location.range.length = 0; + } + defaultProp->addValue(v); + } } } @@ -583,8 +590,8 @@ bool ProcessAST::visit(AST::UiPublicMember *node) QmlScriptParser::TypeReference *typeRef = _parser->findOrCreateType(memberType); typeRef->refObjects.append(_stateStack.top().object); - property.customType = memberType.toUtf8(); } + property.customType = memberType.toUtf8(); property.name = name.toUtf8(); property.location = location(node->firstSourceLocation(), node->lastSourceLocation()); |