Merge "fix: qt找不到应用图标" into uos

This commit is contained in:
niecheng 2020-10-28 14:17:03 +08:00 committed by Gerrit Code Review
commit f4d5ca461c

View File

@ -134,9 +134,14 @@ const QPixmap ThemeAppIcon::getIcon(const QString iconName, const int size, cons
icon = QIcon::fromTheme(iconName);
if (icon.isNull()) {
icon = QIcon::fromTheme("deepinwine-" + iconName);
} else {
icon = QIcon::fromTheme(iconName, QIcon::fromTheme("application-x-desktop"));
//手动更新图标缓存
system("gtk-update-icon-cache /usr/share/icons/hicolor/");
icon = QIcon::fromTheme(iconName);
}
if(icon.isNull()) {
icon = QIcon::fromTheme("application-x-desktop");
}
// load pixmap from Icon-Theme