summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-01-13 14:41:52 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2010-01-13 14:42:54 +0100
commitea9dc164300a291b6e8d477975fd2c876daed781 (patch)
tree3af469c092a3e8ab1d3a6d2fce11cc2f842b4a13
parente3e4f1b986d82f313d676d38f3526baaee120e6a (diff)
downloadqt-creator-ea9dc164300a291b6e8d477975fd2c876daed781.tar.gz
Fixed indentation of QML/JS function calls.
-rw-r--r--src/shared/qscripthighlighter/qscriptindenter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/qscripthighlighter/qscriptindenter.cpp b/src/shared/qscripthighlighter/qscriptindenter.cpp
index dd639e0375..01d3523f33 100644
--- a/src/shared/qscripthighlighter/qscriptindenter.cpp
+++ b/src/shared/qscripthighlighter/qscriptindenter.cpp
@@ -653,8 +653,10 @@ bool QScriptIndenter::isUnfinishedLine()
It doesn't end with ';' or similar. If it's neither
"Q_OBJECT" nor "if (x)", it must be an unfinished line.
*/
- unf = (yyLine->indexOf(QLatin1String("Q_OBJECT")) == -1 &&
- !matchBracelessControlStatement());
+ unf = ! matchBracelessControlStatement();
+ if (unf && lastCh == QLatin1Char(')'))
+ unf = false;
+
} else if (lastCh == QLatin1Char(';')) {
if (lastParen(*yyLine) == QLatin1Char('(')) {
/*