diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-11-13 07:29:21 +0100 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-11-14 09:29:41 +0000 |
commit | e9d0083ccd80c1edd09fb1dd5e97d48585b5507f (patch) | |
tree | 0697412c83d17b189db9dd2b70aa376b238c10b7 /src/plugins/texteditor/indenter.cpp | |
parent | 9a85ce88a7254d9d54c42930a5514f0dd6308ce0 (diff) | |
download | qt-creator-e9d0083ccd80c1edd09fb1dd5e97d48585b5507f.tar.gz |
ClangFormat: Do not format text but indent only
Provide the separate infrastructure for the formatting
but use it only when QTC_FORMAT_INSTEAD_OF_INDENT is
provided in run environment.
Fixes: QTCREATORBUG-21447
Fixes: QTCREATORBUG-21459
Change-Id: I1ad6fe23f5de17016c0c7b18749c6977fc03a22b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/texteditor/indenter.cpp')
-rw-r--r-- | src/plugins/texteditor/indenter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/texteditor/indenter.cpp b/src/plugins/texteditor/indenter.cpp index e5d939d29e..4e47a15abd 100644 --- a/src/plugins/texteditor/indenter.cpp +++ b/src/plugins/texteditor/indenter.cpp @@ -104,6 +104,13 @@ void Indenter::reindent(QTextDocument *doc, const QTextCursor &cursor, const Tab } } +void Indenter::format(QTextDocument *doc, + const QTextCursor &cursor, + const TabSettings &tabSettings) +{ + indent(doc, cursor, QChar::Null, tabSettings); +} + void Indenter::setCodeStylePreferences(ICodeStylePreferences *) { |