From ea9dc164300a291b6e8d477975fd2c876daed781 Mon Sep 17 00:00:00 2001
From: Roberto Raggi <roberto.raggi@nokia.com>
Date: Wed, 13 Jan 2010 14:41:52 +0100
Subject: [PATCH] Fixed indentation of QML/JS function calls.

---
 src/shared/qscripthighlighter/qscriptindenter.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/shared/qscripthighlighter/qscriptindenter.cpp b/src/shared/qscripthighlighter/qscriptindenter.cpp
index dd639e03754..01d3523f336 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('(')) {
             /*
-- 
GitLab