From cce03d9a3c95dd81c31003e0a96c5bb3dca6f0c0 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 9 Sep 2009 08:44:59 +1000 Subject: Don't add newlines in rewriter as it messes up error reporting. --- 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 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); -- cgit v0.12