From 6eab5d70003fe18ada199009d4b636765c609786 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 17 Aug 2009 12:54:28 +1000 Subject: Slightly change expression rewrite to JSC-supported syntax. Preparation for merge of QtScript's JSC backend. --- src/declarative/qml/qmlrewrite.cpp | 4 ++-- 1 file 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); -- cgit v0.12