Skip to content

Commit

Permalink
fix: failed to fallback default icon
Browse files Browse the repository at this point in the history
  It's maybe a bug for deepin-app-store-tool. App's icon is installed
in /opt, the tool will create a link for it's icons, but the action
is async, icon-theme.cache is not ready when launchpad is read.
  and we only ensure display an X icon when icon is invalid.

Issue: linuxdeepin/developer-center#6860
  • Loading branch information
18202781743 committed Jan 12, 2024
1 parent cc4cd2e commit d1bfa1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/iconutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ bool IconUtils::getThemeIcon(QPixmap &pixmap, const QString &iconName, const int

icon = DIconTheme::findQIcon(actualIconName);

if (icon.isNull()) {
// TODO why icon is not null, but it's name is empty;
if (icon.isNull() || icon.name().isEmpty()) {
icon = QIcon(":/images/application-x-desktop.svg");
qDebug() << "It's fallback to default icon for [" << actualIconName << "].";
findIcon = false;
}

Expand Down

0 comments on commit d1bfa1a

Please sign in to comment.