From 8d4e550551bcb1305e0a392bf7545e977d8a9cc2 Mon Sep 17 00:00:00 2001 From: Ivan Donchevskii Date: Tue, 5 Feb 2019 14:48:25 +0100 Subject: [PATCH] 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 --- src/plugins/texteditor/indenter.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/texteditor/indenter.h b/src/plugins/texteditor/indenter.h index 2907ea783ce..8a663be9037 100644 --- a/src/plugins/texteditor/indenter.h +++ b/src/plugins/texteditor/indenter.h @@ -91,11 +91,10 @@ public: } // By default just calls indent with default settings. - virtual Replacements format(const QTextCursor &cursor, - const TabSettings &tabSettings, - int cursorPositionInEditor = -1) + virtual Replacements format(const QTextCursor &/*cursor*/, + const TabSettings &/*tabSettings*/, + int /*cursorPositionInEditor*/ = -1) { - indent(cursor, QChar::Null, tabSettings, cursorPositionInEditor); return Replacements(); }