Fix Qt 6.1 deprectation error

This commit is contained in:
Phillip Stephens 2021-05-23 11:53:46 -07:00
parent 070d34d281
commit f468adc0a3
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
1 changed files with 4 additions and 0 deletions

View File

@ -65,7 +65,11 @@ void ParseEscapeSequence(int attribute, QListIterator<QString>& i, QTextCharForm
case 18:
case 19: {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION >= QT_VERSION_CHECK(6, 1, 0)
QString fontFamily = textCharFormat.fontFamilies().toString();
#else
QString fontFamily = textCharFormat.fontFamily();
#endif
QStringList fontStyles = QFontDatabase::styles(fontFamily);
int fontStyleIndex = attribute - 11;
if (fontStyleIndex < fontStyles.length()) {