diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-11-29 14:37:36 +0100 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-11-30 10:11:28 +0100 |
commit | a24c49720a0068826ad1c2d160cf644efabfa20b (patch) | |
tree | e8511e31bc5f7ae76d198cb3a63a6cf979aed8a9 /src/libs/qmljs/qmljsreformatter.cpp | |
parent | 9056dc384aaab2802bfa61c8c03599b65be23547 (diff) | |
download | qt-creator-a24c49720a0068826ad1c2d160cf644efabfa20b.tar.gz |
QmlJS reformatter: Fix object literals.
The comma token seems to be invalid.
Change-Id: I859fa58ba0ba1e975e0cf1105c2b53aac848fb0d
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Diffstat (limited to 'src/libs/qmljs/qmljsreformatter.cpp')
-rw-r--r-- | src/libs/qmljs/qmljsreformatter.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libs/qmljs/qmljsreformatter.cpp b/src/libs/qmljs/qmljsreformatter.cpp index 884922c698..33b945c805 100644 --- a/src/libs/qmljs/qmljsreformatter.cpp +++ b/src/libs/qmljs/qmljsreformatter.cpp @@ -667,7 +667,7 @@ protected: out(": ", ast->colonToken); accept(it->value); if (it->next) { - out(ast->commaToken); + out(",", ast->commaToken); // always invalid? newLine(); } } @@ -1117,8 +1117,6 @@ protected: virtual bool visit(FunctionExpression *ast) { - if (!firstOnLine()) - newLine(); out("function ", ast->functionToken); if (!ast->name.isNull()) out(ast->identifierToken); |