Utils: move text replacement helper to Utils::Text

Change-Id: I82b3304f91d575369e74d5f7404c189e14ba4730
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-01-08 10:43:13 +01:00
parent 88edfdb1b2
commit c56e58fab4
6 changed files with 72 additions and 69 deletions

View File

@@ -53,7 +53,7 @@ public:
void autoIndent(const QTextCursor &cursor,
const TextEditor::TabSettings &tabSettings,
int cursorPositionInEditor = -1) override;
TextEditor::Replacements format(const TextEditor::RangesInLines &rangesInLines) override;
Utils::Text::Replacements format(const TextEditor::RangesInLines &rangesInLines) override;
void indentBlock(const QTextBlock &block,
const QChar &typedChar,
@@ -78,17 +78,17 @@ private:
const QTextBlock &endBlock,
const QChar &typedChar,
int cursorPositionInEditor);
TextEditor::Replacements indentsFor(QTextBlock startBlock,
const QTextBlock &endBlock,
const QChar &typedChar,
int cursorPositionInEditor);
TextEditor::Replacements replacements(QByteArray buffer,
const QTextBlock &startBlock,
const QTextBlock &endBlock,
int cursorPositionInEditor,
ReplacementsToKeep replacementsToKeep,
const QChar &typedChar = QChar::Null,
bool secondTry = false) const;
Utils::Text::Replacements indentsFor(QTextBlock startBlock,
const QTextBlock &endBlock,
const QChar &typedChar,
int cursorPositionInEditor);
Utils::Text::Replacements replacements(QByteArray buffer,
const QTextBlock &startBlock,
const QTextBlock &endBlock,
int cursorPositionInEditor,
ReplacementsToKeep replacementsToKeep,
const QChar &typedChar = QChar::Null,
bool secondTry = false) const;
};
} // namespace ClangFormat