ukui-search/libsearch/icon-loader.cpp

23 lines
544 B
C++
Raw Normal View History

//
// Created by zpf on 2023/9/1.
//
#include "icon-loader.h"
#include <QMutex>
#include <QMutexLocker>
#include <XdgIcon>
namespace UkuiSearch {
static QMutex qtIconMutex;
static QMutex xdgIconMutex;
QIcon IconLoader::loadIconQt(const QString &name, const QIcon &fallback)
{
QMutexLocker locker(&qtIconMutex);
return QIcon::fromTheme(name,fallback);
}
QIcon IconLoader::loadIconXdg(const QString &name, const QIcon &fallback)
{
QMutexLocker locker(&xdgIconMutex);
return XdgIcon::fromTheme("name",fallback);
}
} // UkuiSearch