]> cloud.milkyroute.net Git - dolphin.git/commitdiff
simplify + add todo (early commit to make room for the next kdebase-wide commit)
authorDavid Faure <faure@kde.org>
Fri, 6 Jul 2007 13:36:04 +0000 (13:36 +0000)
committerDavid Faure <faure@kde.org>
Fri, 6 Jul 2007 13:36:04 +0000 (13:36 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=684300

src/dolphinview.cpp

index 042c74b2c0151b7fa3e324fc4609603dcea72d63..4895f199cb0d82e433dc8603bec409f012327669 100644 (file)
@@ -465,18 +465,11 @@ void DolphinView::triggerItem(const QModelIndex& index)
         return;
     }
 
         return;
     }
 
-    // Prefer the local path over the URL. This assures that the
-    // volume space information is correct. Assuming that the URL is media:/sda1,
-    // and the local path is /windows/C: For the URL the space info is related
-    // to the root partition (and hence wrong) and for the local path the space
-    // info is related to the windows partition (-> correct).
-    const QString localPath(item->localPath());
-    KUrl url;
-    if (localPath.isEmpty()) {
-        url = item->url();
-    } else {
-        url = localPath;
-    }
+    // The stuff below should be moved to ViewContainer and be just a signal?
+
+    // Prefer the local path over the URL.
+    bool isLocal;
+    KUrl url = item->mostLocalUrl(isLocal);
 
     if (item->isDir()) {
         setUrl(url);
 
     if (item->isDir()) {
         setUrl(url);