mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 16:54:08 +00:00
Merge pull request #67 from xiaoyifang/staged
fix:font family compile error on qt5.15.2
This commit is contained in:
commit
3efaf8c1e3
|
@ -94,8 +94,12 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
|
||||||
prevInterfaceLanguage = x;
|
prevInterfaceLanguage = x;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if( QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) )
|
||||||
const QStringList fontFamilies = QFontDatabase::families();
|
const QStringList fontFamilies = QFontDatabase::families();
|
||||||
|
#else
|
||||||
|
QFontDatabase fontDb;
|
||||||
|
const QStringList fontFamilies = fontDb.families();
|
||||||
|
#endif
|
||||||
for( const QString & family : fontFamilies )
|
for( const QString & family : fontFamilies )
|
||||||
{
|
{
|
||||||
ui.fontFamilies->addItem( family );
|
ui.fontFamilies->addItem( family );
|
||||||
|
|
Loading…
Reference in a new issue