Skip to content

Commit

Permalink
Merge pull request #67 from xiaoyifang/staged
Browse files Browse the repository at this point in the history
fix:font family compile error on qt5.15.2
  • Loading branch information
xiaoyifang authored May 8, 2022
2 parents 9d10ca5 + 368724d commit 3efaf8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion preferences.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
prevInterfaceLanguage = x;
break;
}

#if( QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) )
const QStringList fontFamilies = QFontDatabase::families();
#else
QFontDatabase fontDb;
const QStringList fontFamilies = fontDb.families();
#endif
for( const QString & family : fontFamilies )
{
ui.fontFamilies->addItem( family );
Expand Down

0 comments on commit 3efaf8c

Please sign in to comment.