mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
fix:font family compile error on qt5.15.2
This commit is contained in:
parent
9d10ca5c2f
commit
368724dde3
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue