forked from qt-creator/qt-creator
ClangFormat: Improve mass indentation performance
Do not indent lines separately but call reformat only once and then extract the proper replacements. Remove some redundant code in process. Change-Id: If3a0419fef9fb2ec5422d11343fdc3414f5751b7 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -75,16 +75,16 @@ protected:
|
||||
|
||||
private:
|
||||
void indent(const QTextCursor &cursor, const QChar &typedChar, int cursorPositionInEditor);
|
||||
void indentBlock(const QTextBlock &block, const QChar &typedChar, int cursorPositionInEditor);
|
||||
void indentBlocks(const QTextBlock &startBlock,
|
||||
const QTextBlock &endBlock,
|
||||
const QChar &typedChar,
|
||||
int cursorPositionInEditor);
|
||||
int indentFor(const QTextBlock &block, int cursorPositionInEditor);
|
||||
void indentBeforeCursor(const QTextBlock &block,
|
||||
const QChar &typedChar,
|
||||
int cursorPositionInEditor);
|
||||
TextEditor::Replacements replacements(QByteArray buffer,
|
||||
int utf8Offset,
|
||||
int utf8Length,
|
||||
const QTextBlock &block,
|
||||
int cursorPositionInEditor,
|
||||
const QTextBlock &startBlock,
|
||||
const QTextBlock &endBlock,
|
||||
ReplacementsToKeep replacementsToKeep,
|
||||
const QChar &typedChar = QChar::Null,
|
||||
bool secondTry = false) const;
|
||||
|
||||
Reference in New Issue
Block a user