C++ indenter: Require explicit state update requests.

This will allow much faster indenting of selected areas as the state
doesn't have to be checked again for every line.
This commit is contained in:
Christian Kamm
2010-07-06 13:52:49 +02:00
parent c2a3346716
commit 8dbbf9be92
4 changed files with 6 additions and 4 deletions

View File

@@ -1539,6 +1539,7 @@ void CPPEditor::indentBlock(QTextDocument *doc, QTextBlock block, QChar typedCha
codeFormatter.setIndentDeclarationMembers(true);
}
codeFormatter.updateStateUntil(block);
const int depth = codeFormatter.indentFor(block);
ts.indentLine(block, depth);
}