mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
Check for valid icon file
This commit is contained in:
parent
71399d5eb2
commit
adfd993f6b
|
@ -54,7 +54,7 @@ public:
|
||||||
if( !icon.isNull() && !icon.isEmpty() )
|
if( !icon.isNull() && !icon.isEmpty() )
|
||||||
{
|
{
|
||||||
QFileInfo fInfo( QDir( Config::getConfigDir() ), icon );
|
QFileInfo fInfo( QDir( Config::getConfigDir() ), icon );
|
||||||
if( fInfo.exists() )
|
if( fInfo.isFile() )
|
||||||
return QIcon( fInfo.absoluteFilePath() );
|
return QIcon( fInfo.absoluteFilePath() );
|
||||||
}
|
}
|
||||||
return QIcon(":/icons/icon32_wiki.png");
|
return QIcon(":/icons/icon32_wiki.png");
|
||||||
|
|
Loading…
Reference in a new issue