]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix another problem with the network:/ ioslave: don't keep the mimetype when clicking...
authorDavid Faure <faure@kde.org>
Fri, 9 Jul 2010 13:15:02 +0000 (13:15 +0000)
committerDavid Faure <faure@kde.org>
Fri, 9 Jul 2010 13:15:02 +0000 (13:15 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1147967

src/dolphinpart.cpp

index 519d05741dc146a6c460a9cb3ec0429057126a2a..2dec262e11e5607a14cc553a3d7fe6604058965b 100644 (file)
@@ -347,7 +347,11 @@ void DolphinPart::slotRequestItemInfo(const KFileItem& item)
 void DolphinPart::slotItemTriggered(const KFileItem& item)
 {
     KParts::OpenUrlArguments args;
-    args.setMimeType(item.mimetype());
+    // Forget about the known mimetype if a target URL is used.
+    // Testcase: network:/ with a item (mimetype "inode/some-foo-service") pointing to a http URL (html)
+    if (item.targetUrl() == item.url()) {
+        args.setMimeType(item.mimetype());
+    }
 
     // Ideally, konqueror should be changed to not require trustedSource for directory views,
     // since the idea was not to need BrowserArguments for non-browser stuff...