Editor: reduce complexity of TextDocumentManipulator

Move implementations either to the TextEditorWidget, TextDocument, or to
the caller side. This makes the TextDocumentManipulator basically a
repeater so we can easily replace it with a TextEditorWidget in the
next step.

Change-Id: I04de3cb295b56fbaae99145f8e579fe405b065a5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2024-06-28 08:35:40 +02:00
parent f09a694cfc
commit 9ad0a5a641
15 changed files with 94 additions and 117 deletions

View File

@@ -340,6 +340,11 @@ QChar TextDocument::characterAt(int pos) const
return document()->characterAt(pos);
}
QString TextDocument::blockText(int blockNumber) const
{
return document()->findBlockByNumber(blockNumber).text();
}
void TextDocument::setTypingSettings(const TypingSettings &typingSettings)
{
d->m_typingSettings = typingSettings;