mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-22 13:43:11 +02:00
Don't crash if we could not add a font.
This commit is contained in:
@@ -213,8 +213,15 @@ TomahawkStyle::loadFonts()
|
|||||||
QDir dir( ":/data/fonts" );
|
QDir dir( ":/data/fonts" );
|
||||||
foreach ( const QString& fileName, dir.entryList() )
|
foreach ( const QString& fileName, dir.entryList() )
|
||||||
{
|
{
|
||||||
tDebug() << "Trying to add font resource:" << fileName;
|
tDebug( LOGVERBOSE ) << "Trying to add font resource:" << fileName;
|
||||||
const int id = QFontDatabase::addApplicationFont( ":/data/fonts/" + fileName );
|
const int id = QFontDatabase::addApplicationFont( ":/data/fonts/" + fileName );
|
||||||
tDebug() << "Added font:" << id << QFontDatabase::applicationFontFamilies( id ).first();
|
if ( id >= 0 )
|
||||||
|
{
|
||||||
|
tDebug( LOGVERBOSE ) << "Added font:" << id << QFontDatabase::applicationFontFamilies( id ).first();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tDebug() << "Could not add font resource:" << fileName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user