summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-09-08 22:44:59 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-09-08 22:44:59 (GMT)
commitcce03d9a3c95dd81c31003e0a96c5bb3dca6f0c0 (patch)
treeacf00628e46525ee65f77930f052c353c53bd659
parent382afea50beb03a820f6381d6f2c936ccc1afac4 (diff)
downloadQt-cce03d9a3c95dd81c31003e0a96c5bb3dca6f0c0.zip
Qt-cce03d9a3c95dd81c31003e0a96c5bb3dca6f0c0.tar.gz
Qt-cce03d9a3c95dd81c31003e0a96c5bb3dca6f0c0.tar.bz2
Don't add newlines in rewriter as it messes up error reporting.
-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);