diff --git a/libsearch/icon-loader.cpp b/libsearch/icon-loader.cpp index e78aadc..0111559 100644 --- a/libsearch/icon-loader.cpp +++ b/libsearch/icon-loader.cpp @@ -22,12 +22,21 @@ #include #include #include +#include namespace UkuiSearch { static QMutex qtIconMutex; static QMutex xdgIconMutex; QIcon IconLoader::loadIconQt(const QString &name, const QIcon &fallback) { QMutexLocker locker(&qtIconMutex); + if(QFile::exists(name)) { + QIcon icon(name); + if(!QIcon(name).isNull()) { + return icon; + } else { + return fallback; + } + } return QIcon::fromTheme(name,fallback); }