Commit 85297315 authored by Jan Grulich's avatar Jan Grulich

Fallback for cached icons

Apparently some appstream metadata might have icon information in form of
<icon height="128" width="128" type="cached">org.gnome.gedit</icon>
instead of
<icon height="128" width="128" type="cached">128x128/org.gnome.gedit</icon>
which leads into missing icon as we are looking into wrong location.

Reviewers: apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 1ff98366
......@@ -184,6 +184,11 @@ QVariant FlatpakResource::icon() const
const QString path = m_iconPath + icon.url().path();
if (QFileInfo::exists(path)) {
ret.addFile(path, icon.size());
} else {
const QString altPath = m_iconPath + QStringLiteral("%1x%2/").arg(icon.size().width()).arg(icon.size().height()) + icon.url().path();
if (QFileInfo::exists(altPath)) {
ret.addFile(altPath, icon.size());
} break;
case AppStream::Icon::KindStock:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment