diff options
author | David Schulz <david.schulz@qt.io> | 2024-01-18 09:12:40 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2024-01-18 12:01:35 +0000 |
commit | ec6732511f0a7737520a2bdde5d2d9833910b7a0 (patch) | |
tree | eeb7bac1185865c9873b9ba6b124ec63e82d1429 /src/plugins/texteditor/refactoringchanges.cpp | |
parent | 1cb58e80d82310994cabadb95d4637569092ae4e (diff) |
TextEditor: fix autoIndent
e70b99c7da49c27b519f2fcacb4e06974ef1f6ad broke the auto indent for all
indenters because those indenters are all based on the text indenter.
Add a fallback indenter that is used if no other indenter is configured
for a document, and avoid the auto indentation only if that fallback
indenter is used.
Change-Id: I00e04a07ab14c5fc433a71d1b9826f8e4cc5c0a0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/texteditor/refactoringchanges.cpp')
-rw-r--r-- | src/plugins/texteditor/refactoringchanges.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/texteditor/refactoringchanges.cpp b/src/plugins/texteditor/refactoringchanges.cpp index 6164f2e54a..8c06b9354c 100644 --- a/src/plugins/texteditor/refactoringchanges.cpp +++ b/src/plugins/texteditor/refactoringchanges.cpp @@ -341,7 +341,7 @@ void RefactoringFile::doFormatting() ICodeStylePreferencesFactory * const factory = TextEditorSettings::codeStyleFactory(indenterId()); indenterOwner.reset(factory ? factory->createIndenter(document) - : new TextIndenter(document)); + : new PlainTextIndenter(document)); indenter = indenterOwner.get(); tabSettings = TabSettings::settingsForFile(filePath()); } |