summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlrewrite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlrewrite.cpp')
-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 3f35160..5166c96 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() { "));
+ _writer->replace(endOfStatement, 0, QLatin1String(" })"));
w.write(&code);