QtOutputFormatter: Use cursor object from base class

There does not seem to be a reason for the duplication.

Change-Id: I7c9b016c76a9aa93ccd93af0aea931fa5b148300
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-03-12 17:45:26 +01:00
parent f6cfcc4411
commit ea8efe58c6
3 changed files with 16 additions and 17 deletions

View File

@@ -112,6 +112,11 @@ void OutputFormatter::append(const QString &text, const QTextCharFormat &format)
d->cursor.insertText(text.mid(startPos), format);
}
QTextCursor &OutputFormatter::cursor() const
{
return d->cursor;
}
QTextCharFormat OutputFormatter::linkFormat(const QTextCharFormat &inputFormat, const QString &href)
{
QTextCharFormat result = inputFormat;