From: Peter Penz Date: Sat, 17 Dec 2011 22:11:33 +0000 (+0100) Subject: Determine the path of the trash-protocol correctly X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/999e498a6871857465fb9502b760c89e1a0e966e Determine the path of the trash-protocol correctly --- 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 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]) {