From: Ivailo Monev Date: Thu, 5 May 2022 19:51:04 +0000 (+0300) Subject: kioslave: set the icon for the service to the one set in the MIME type from the netwo... X-Git-Tag: 4.22.0~598 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=47b62e9d71f25a45318372d73e48518660db6f6a;p=kde%2Fkde-workspace.git kioslave: set the icon for the service to the one set in the MIME type from the network KIO slave Signed-off-by: Ivailo Monev --- diff --git a/kioslave/network/ioslave/networkslave.cpp b/kioslave/network/ioslave/networkslave.cpp index 41a8589a..6c955421 100644 --- a/kioslave/network/ioslave/networkslave.cpp +++ b/kioslave/network/ioslave/networkslave.cpp @@ -22,6 +22,7 @@ #include "networkslave.h" +#include #include #include @@ -35,10 +36,7 @@ static QString mimeForService(const KDNSSDService &kdnssdservice) static QString iconForService(const KDNSSDService &kdnssdservice) { - if (kdnssdservice.url.startsWith(QLatin1String("rfb://"))) { - return QString::fromLatin1("krfb"); - } - return QString::fromLatin1("network-workgroup"); + return KMimeType::mimeType(mimeForService(kdnssdservice))->iconName(); } NetworkSlave::NetworkSlave(const QByteArray &name, const QByteArray &poolSocket, const QByteArray &programSocket)