┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-12-17 23:11:33 +0100
committerPeter Penz <[email protected]>2011-12-17 23:11:59 +0100
commit999e498a6871857465fb9502b760c89e1a0e966e (patch)
treee4bb920bf3de2618ed7fd3fa65cfd6d2e3b3dffc /src
parent5f1ae054d7c5b7bc23d49dd2aeea2d9bf5ea90c4 (diff)
Determine the path of the trash-protocol correctly
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/kfileitemmodel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 86ec5de89..04ec34966 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -1133,7 +1133,12 @@ QHash<QByteArray, QVariant> KFileItemModel::retrieveData(const KFileItem& item)
}
if (m_requestRole[PathRole]) {
- data.insert("path", item.localPath());
+ if (item.url().protocol() == QLatin1String("trash")) {
+ const KIO::UDSEntry udsEntry = item.entry();
+ data.insert("path", udsEntry.stringValue(KIO::UDSEntry::UDS_EXTRA));
+ } else {
+ data.insert("path", item.localPath());
+ }
}
if (m_requestRole[IsExpandedRole]) {