ClangFormat: Introduce check to format code instead of indenting

Ctrl+I with the new check will reformat the selected code or
the current line instead.

Change-Id: Ia5a72c4a09621034d0dfe463f669fe1ca36b0b5f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2019-01-28 07:54:05 +01:00
parent 9d046826f8
commit 80fb0178fd
17 changed files with 182 additions and 26 deletions

View File

@@ -102,12 +102,6 @@ void TextIndenter::reindent(const QTextCursor &cursor, const TabSettings &tabSet
}
}
Replacements TextIndenter::format(const QTextCursor &cursor, const TabSettings &tabSettings)
{
indent(cursor, QChar::Null, tabSettings);
return Replacements();
}
Utils::optional<TabSettings> TextIndenter::tabSettings() const
{
return Utils::optional<TabSettings>();