summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlscriptparser.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-23 04:14:47 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-23 04:14:47 (GMT)
commitd7133797672a66cbdab759e32daaf0cb1f52e78d (patch)
tree893089b0a5ac77b51871791695dad87b48858a3e /src/declarative/qml/qmlscriptparser.cpp
parent3386479da9526f0ae8978cd9e0afdd0559049ef9 (diff)
downloadQt-d7133797672a66cbdab759e32daaf0cb1f52e78d.zip
Qt-d7133797672a66cbdab759e32daaf0cb1f52e78d.tar.gz
Qt-d7133797672a66cbdab759e32daaf0cb1f52e78d.tar.bz2
Use QmlScriptString for Connection script
(instead of AST special-case handling) Fixes QT-734
Diffstat (limited to 'src/declarative/qml/qmlscriptparser.cpp')
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp41
1 files changed, 1 insertions, 40 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index 6e5f315..fb84651 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -365,46 +365,7 @@ Object *ProcessAST::defineObjectBinding(AST::UiQualifiedId *qualifiedId,
const QString objectType = asString(objectTypeName);
const AST::SourceLocation typeLocation = objectTypeName->identifierToken;
- if (objectType == QLatin1String("Connection")) {
-
- Object *obj = defineObjectBinding_helper(/*propertyName = */0, objectType, typeLocation, location);
-
- _stateStack.pushObject(obj);
-
- AST::UiObjectMemberList *it = initializer->members;
- for (; it; it = it->next) {
- AST::UiScriptBinding *scriptBinding = AST::cast<AST::UiScriptBinding *>(it->member);
- if (! scriptBinding)
- continue;
-
- QString propertyName = asString(scriptBinding->qualifiedId);
- if (propertyName == QLatin1String("script")) {
- QString script;
-
- if (AST::ExpressionStatement *stmt = AST::cast<AST::ExpressionStatement *>(scriptBinding->statement)) {
- script = getVariant(stmt->expression).asScript();
- } else {
- script = asString(scriptBinding->statement);
- }
-
- LocationSpan l = this->location(scriptBinding->statement->firstSourceLocation(),
- scriptBinding->statement->lastSourceLocation());
-
- _stateStack.pushProperty(QLatin1String("script"), l);
- Value *value = new Value;
- value->value = QmlParser::Variant(script);
- value->location = l;
- currentProperty()->addValue(value);
- _stateStack.pop();
- } else {
- accept(it->member);
- }
- }
-
- _stateStack.pop(); // object
-
- return obj;
- } else if (objectType == QLatin1String("Script")) {
+ if (objectType == QLatin1String("Script")) {
AST::UiObjectMemberList *it = initializer->members;
for (; it; it = it->next) {