Skip to content

Commit

Permalink
Fix deprecation warning from QTextCharFormat::setFontFamily in Qt > 6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaure-kdab committed Dec 12, 2023
1 parent 62ed735 commit bc5f303
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/KDReports/KDReportsTextElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ void KDReports::TextElement::build(ReportBuilder &builder) const
if (d->m_pointSize > 0)
charFormat.setFontPointSize(d->m_pointSize);
if (!d->m_fontFamily.isEmpty())
#if QT_VERSION >= QT_VERSION_CHECK(6, 1, 0)
charFormat.setFontFamilies({d->m_fontFamily});
#else
charFormat.setFontFamily(d->m_fontFamily);
#endif
if (d->m_foreground.isValid())
charFormat.setForeground(d->m_foreground);
else
Expand Down

0 comments on commit bc5f303

Please sign in to comment.