mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
kioslave: set the service MIME type to "inode/vnd.kde.service.unknown" when it is unknown from network slave
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5d5350a6af
commit
ecdddf515a
1 changed files with 7 additions and 1 deletions
|
@ -44,9 +44,15 @@ static QString urlForService(const KDNSSDService &kdnssdservice)
|
|||
|
||||
static QString mimeForService(const KDNSSDService &kdnssdservice)
|
||||
{
|
||||
return QString::fromLatin1("inode/vnd.kde.service.%1").arg(
|
||||
const QString servicemimetype = QString::fromLatin1("inode/vnd.kde.service.%1").arg(
|
||||
KUrl(kdnssdservice.url).protocol()
|
||||
);
|
||||
// qDebug() << Q_FUNC_INFO << servicemimetype;
|
||||
const KMimeType::Ptr kmimetypeptr = KMimeType::mimeType(servicemimetype);
|
||||
if (kmimetypeptr.isNull()) {
|
||||
return QString::fromLatin1("inode/vnd.kde.service.unknown");
|
||||
}
|
||||
return kmimetypeptr->name();
|
||||
}
|
||||
|
||||
static QString iconForService(const QString &servicemimetype)
|
||||
|
|
Loading…
Add table
Reference in a new issue