Commit eea6810b authored by Alexander Lohnau's avatar Alexander Lohnau
Browse files

Merge branch 'Plasma/5.19'

parents eb736685 ba44b69a
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <QProcess> #include <QProcess>
#include <QQmlPropertyMap> #include <QQmlPropertyMap>
#include <QStandardPaths> #include <QStandardPaths>
#include <QFileInfo>
#if HAVE_X11 #if HAVE_X11
#include <QX11Info> #include <QX11Info>
#endif #endif
...@@ -91,7 +92,11 @@ bool AppEntry::isValid() const ...@@ -91,7 +92,11 @@ bool AppEntry::isValid() const
QIcon AppEntry::icon() const QIcon AppEntry::icon() const
{ {
if (m_icon.isNull()) { if (m_icon.isNull()) {
m_icon = QIcon::fromTheme(m_service->icon(), QIcon::fromTheme(QStringLiteral("unknown"))); if (QFileInfo::exists(m_service->icon())) {
m_icon = QIcon(m_service->icon());
} else {
m_icon = QIcon::fromTheme(m_service->icon(), QIcon::fromTheme(QStringLiteral("unknown")));
}
} }
return m_icon; return m_icon;
} }
......
...@@ -221,7 +221,7 @@ QVariant RecentUsageModel::appData(const QString &resource, int role) const ...@@ -221,7 +221,7 @@ QVariant RecentUsageModel::appData(const QString &resource, int role) const
return AppEntry::nameFromService(service, AppEntry::NameOnly); return AppEntry::nameFromService(service, AppEntry::NameOnly);
} }
} else if (role == Qt::DecorationRole) { } else if (role == Qt::DecorationRole) {
return QIcon::fromTheme(service->icon(), QIcon::fromTheme(QStringLiteral("unknown"))); return service->icon();
} else if (role == Kicker::DescriptionRole) { } else if (role == Kicker::DescriptionRole) {
return service->comment(); return service->comment();
} else if (role == Kicker::GroupRole) { } else if (role == Kicker::GroupRole) {
......
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