forked from qt-creator/qt-creator
CppEditor: Format quickfix code only if formatting is enabled
... in the ClangFormat settings (rather than the default of just indenting). As opposed to files generated by the wizard, quickfixes are often touching existing code, and since ClangFormat works on line granularity, users will experience unexpected re-formattings when ClangFormat is in indent- only mode. Therefore, do the formatting only if the user has enabled it in the ClangFormat settings. Change-Id: Icb30f166f2b6fb94113a8f25c4a5f92ff8bca9b0 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -31,7 +31,8 @@ public:
|
||||
void autoIndent(const QTextCursor &cursor,
|
||||
const TextEditor::TabSettings &tabSettings,
|
||||
int cursorPositionInEditor = -1) override;
|
||||
Utils::Text::Replacements format(const TextEditor::RangesInLines &rangesInLines) override;
|
||||
Utils::Text::Replacements format(const TextEditor::RangesInLines &rangesInLines,
|
||||
FormattingMode mode = FormattingMode::Forced) override;
|
||||
|
||||
void indentBlock(const QTextBlock &block,
|
||||
const QChar &typedChar,
|
||||
|
||||
Reference in New Issue
Block a user