diff --git a/abstract_client.cpp b/abstract_client.cpp index 213725352d..e3a3c8438d 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -43,6 +43,7 @@ along with this program. If not, see . #include +#include #include #include @@ -2545,8 +2546,16 @@ void AbstractClient::setDesktopFileName(QByteArray name) 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"));