[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.5/kdelibs/kio/kio
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2010-08-04 9:12:19
Message-ID: 20100804091219.8CDC2AC7CB () svn ! kde ! org
[Download RAW message or body]

SVN commit 1159063 by trueg:

Backport: Take the targetUrl into account when determining the nepomuk URI for a file item.

 M  +7 -4      kfileitem.cpp  


--- branches/KDE/4.5/kdelibs/kio/kio/kfileitem.cpp #1159062:1159063
@@ -1348,14 +1348,17 @@
 
 KUrl KFileItem::nepomukUri() const
 {
-    if(isLocalFile()) {
-        return url();
-    }
-    else {
         const QString nepomukUriStr = d->m_entry.stringValue( KIO::UDSEntry::UDS_NEPOMUK_URI );
+    if(!nepomukUriStr.isEmpty()) {
         return KUrl(nepomukUriStr);
     }
+    else if(targetUrl().isLocalFile()) {
+        return targetUrl();
 }
+    else {
+        return KUrl();
+    }
+}
 
 /*
  * Mimetype handling.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic