diff --git a/abstract_client.cpp b/abstract_client.cpp --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -2544,14 +2544,15 @@ QString AbstractClient::iconFromDesktopFile() const { - if (m_desktopFileName.isEmpty()) { - return QString(); - } - QString desktopFile = QString::fromUtf8(m_desktopFileName); - if (!desktopFile.endsWith(QLatin1String(".desktop"))) { - desktopFile.append(QLatin1String(".desktop")); + const QString desktopFileName = QString::fromUtf8(m_desktopFileName); + QString desktopFilePath = QStandardPaths::locate(QStandardPaths::ApplicationsLocation, + desktopFileName); + if (desktopFilePath.isEmpty()) { + desktopFilePath = QStandardPaths::locate(QStandardPaths::ApplicationsLocation, + desktopFileName + QLatin1String(".desktop")); } - KDesktopFile df(desktopFile); + + KDesktopFile df(desktopFilePath); return df.readIcon(); }