Fixed indentation of single line QML/JS comments.

This commit is contained in:
Roberto Raggi
2010-01-15 12:27:25 +01:00
parent 9ac98a402c
commit ed1414a406

View File

@@ -226,9 +226,11 @@ QString QScriptIndenter::trimmedCodeLine(const QString &t)
int e = token.length; int e = token.length;
if (token.offset > 0 || startState == 0) { if (token.offset > 0 || startState == 0) {
if (token.length >= 2 && t.midRef(token.offset, 2) == QLatin1String("/*")) {
trimmed.append(QLatin1String("/*")); trimmed.append(QLatin1String("/*"));
i += 2; i += 2;
} }
}
bool needEndOfComment = false; bool needEndOfComment = false;
if (e > 2 && token.end() == t.length() && scanner.endState() != 0) { if (e > 2 && token.end() == t.length() && scanner.endState() != 0) {