ClangTools: Do not format code after fix-its without ClangFormat plugin

Applying analyser fix-its triggers formatting after each fix-it.
In case of no ClangFormat plugin this instead lead to indentation call.

Do not trigger anything instead when ClangFormat is not enabled.

Task-number: QTCREATORBUG-21880
Change-Id: I2f9e6e69be0366d2bb0701228bb5d562ef0095f2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2019-02-05 14:48:25 +01:00
parent 3f10e77b4c
commit 8d4e550551

View File

@@ -91,11 +91,10 @@ public:
} }
// By default just calls indent with default settings. // By default just calls indent with default settings.
virtual Replacements format(const QTextCursor &cursor, virtual Replacements format(const QTextCursor &/*cursor*/,
const TabSettings &tabSettings, const TabSettings &/*tabSettings*/,
int cursorPositionInEditor = -1) int /*cursorPositionInEditor*/ = -1)
{ {
indent(cursor, QChar::Null, tabSettings, cursorPositionInEditor);
return Replacements(); return Replacements();
} }