From: Sebastian Trueg Date: Tue, 8 Dec 2009 15:51:51 +0000 (+0000) Subject: Do not show links for unsupported protocols, ie. pre-4.4 resources which used URNs... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/d326572a72163da3ecda128c87dac84c00d8b017 Do not show links for unsupported protocols, ie. pre-4.4 resources which used URNs instead of nepomuk:/res/ URIs. svn path=/trunk/KDE/kdebase/apps/; revision=1060341 --- diff --git a/src/panels/information/kloadmetadatathread.cpp b/src/panels/information/kloadmetadatathread.cpp index fa1f3e1e9..37c2cf64e 100644 --- a/src/panels/information/kloadmetadatathread.cpp +++ b/src/panels/information/kloadmetadatathread.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -168,9 +169,12 @@ QString KLoadMetaDataThread::formatValue(const Nepomuk::Variant& value) } else if (value.isResource() || value.isResourceList()) { QStringList links; foreach(const Nepomuk::Resource& res, value.toResourceList()) { - links << QString::fromLatin1("%2") - .arg(KUrl(res.resourceUri()).url()) - .arg(res.genericLabel()); + if (KProtocolInfo::isKnownProtocol(res.resourceUri())) + links << QString::fromLatin1("%2") + .arg(KUrl(res.resourceUri()).url()) + .arg(res.genericLabel()); + else + links << res.genericLabel(); } return QLatin1String("

") + links.join(QLatin1String(";\n")); } else {