forked from qt-creator/qt-creator
ClangFormat: Format multiple text ranges at once
'reformat' function in LibFormat accepts mutilple ranges. Let's provide the ranges for the same file together when formatting on save and formatting after fix-its. Change-Id: I27789da83a1efc27beb57acf238508a191562bb9 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -53,9 +53,8 @@ public:
|
||||
void formatOrIndent(const QTextCursor &cursor,
|
||||
const TextEditor::TabSettings &tabSettings,
|
||||
int cursorPositionInEditor = -1) override;
|
||||
TextEditor::Replacements format(const QTextCursor &cursor,
|
||||
const TextEditor::TabSettings &tabSettings,
|
||||
int cursorPositionInEditor = -1) override;
|
||||
TextEditor::Replacements format(
|
||||
const TextEditor::RangesInLines &rangesInLines = TextEditor::RangesInLines()) override;
|
||||
|
||||
void indentBlock(const QTextBlock &block,
|
||||
const QChar &typedChar,
|
||||
@@ -75,7 +74,6 @@ protected:
|
||||
virtual int lastSaveRevision() const { return 0; }
|
||||
|
||||
private:
|
||||
TextEditor::Replacements format(const QTextCursor &cursor, int cursorPositionInEditor);
|
||||
void indent(const QTextCursor &cursor, const QChar &typedChar, int cursorPositionInEditor);
|
||||
void indentBlock(const QTextBlock &block, const QChar &typedChar, int cursorPositionInEditor);
|
||||
int indentFor(const QTextBlock &block, int cursorPositionInEditor);
|
||||
|
||||
Reference in New Issue
Block a user