]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Return a value for the "LocalPathOrUrl" column.
authorPeter Penz <peter.penz19@gmail.com>
Thu, 20 May 2010 19:24:12 +0000 (19:24 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 20 May 2010 19:24:12 +0000 (19:24 +0000)
The values for the columns "LinkDestination" and "LocalPathOrUrl" should be moved from DolphinModel to KDirModel, as otherwise the added Information enums in KFileItemDelegate would not make much sense (I'll provide a patch on the reviewboard next week).

CCMAIL: trueg@kde.org

svn path=/trunk/KDE/kdebase/apps/; revision=1128953

src/dolphinmodel.cpp

index 351967f76e11add55371a9793a6dbc135a26484e..137274e0dffa7e12572568578ce3ed5e15807c72 100644 (file)
@@ -102,7 +102,9 @@ QVariant DolphinModel::data(const QModelIndex& index, int role) const
         }
 
         case DolphinModel::LocalPathOrUrl:
-            // TODO:
+            const KDirModel *dirModel = qobject_cast<const KDirModel*>(index.model());
+            const KFileItem item = dirModel->itemForIndex(index);
+            return item.localPath();
             break;
         }
         break;