diff --git a/abstract_client.cpp b/abstract_client.cpp --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -43,6 +43,7 @@ #include +#include #include #include @@ -2545,8 +2546,16 @@ QString AbstractClient::iconFromDesktopFile() const { const QString desktopFileName = QString::fromUtf8(m_desktopFileName); - QString desktopFilePath = QStandardPaths::locate(QStandardPaths::ApplicationsLocation, - desktopFileName); + QString desktopFilePath; + + if (QDir::isAbsolutePath(desktopFileName)) { + desktopFilePath = desktopFileName; + } + + if (desktopFilePath.isEmpty()) { + desktopFilePath = QStandardPaths::locate(QStandardPaths::ApplicationsLocation, + desktopFileName); + } if (desktopFilePath.isEmpty()) { desktopFilePath = QStandardPaths::locate(QStandardPaths::ApplicationsLocation, desktopFileName + QLatin1String(".desktop"));