summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-08-17 02:54:28 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-08-17 02:54:28 (GMT)
commit6eab5d70003fe18ada199009d4b636765c609786 (patch)
treef769601189ea57f3eeb2126ed07dc821f982b1c1
parentc968a51e50e81c9665df98de44941b47716d99c3 (diff)
downloadQt-6eab5d70003fe18ada199009d4b636765c609786.zip
Qt-6eab5d70003fe18ada199009d4b636765c609786.tar.gz
Qt-6eab5d70003fe18ada199009d4b636765c609786.tar.bz2
Slightly change expression rewrite to JSC-supported syntax.
Preparation for merge of QtScript's JSC backend.
-rw-r--r--src/declarative/qml/qmlrewrite.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlrewrite.cpp b/src/declarative/qml/qmlrewrite.cpp
index c708418..3f35160 100644
--- a/src/declarative/qml/qmlrewrite.cpp
+++ b/src/declarative/qml/qmlrewrite.cpp
@@ -73,8 +73,8 @@ QString RewriteBinding::rewrite(QString code, unsigned position,
unsigned startOfStatement = node->firstSourceLocation().begin() - _position;
unsigned endOfStatement = node->lastSourceLocation().end() - _position;
- _writer->replace(startOfStatement, 0, QLatin1String("function() {\n"));
- _writer->replace(endOfStatement, 0, QLatin1String("\n}"));
+ _writer->replace(startOfStatement, 0, QLatin1String("(function() {\n"));
+ _writer->replace(endOfStatement, 0, QLatin1String("\n})"));
w.write(&code);