TextEditor: fix autoIndent

e70b99c7da 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>
This commit is contained in:
David Schulz
2024-01-18 09:12:40 +01:00
parent 1cb58e80d8
commit ec6732511f
4 changed files with 24 additions and 16 deletions

View File

@@ -58,7 +58,7 @@ class TextDocumentPrivate
{
public:
TextDocumentPrivate()
: m_indenter(new TextIndenter(&m_document))
: m_indenter(new PlainTextIndenter(&m_document))
{
}