Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/trash/kio_trash.cpp
Show First 20 Lines • Show All 271 Lines • ▼ Show 20 Line(s) | 193 | { | |||
---|---|---|---|---|---|
272 | } else { | 272 | } else { | ||
273 | error(KIO::ERR_UNSUPPORTED_ACTION, i18n("Internal error in copyOrMove, should never happen")); | 273 | error(KIO::ERR_UNSUPPORTED_ACTION, i18n("Internal error in copyOrMove, should never happen")); | ||
274 | } | 274 | } | ||
275 | } | 275 | } | ||
276 | 276 | | |||
277 | void TrashProtocol::createTopLevelDirEntry(KIO::UDSEntry &entry) | 277 | void TrashProtocol::createTopLevelDirEntry(KIO::UDSEntry &entry) | ||
278 | { | 278 | { | ||
279 | entry.clear(); | 279 | entry.clear(); | ||
280 | entry.fastInsert(KIO::UDSEntry::UDS_NAME, QStringLiteral(".")); | 280 | entry.fastInsert(KIO::UDSEntry::UDS_NAME, QStringLiteral(".")); | ||
broulik: `UDS_NAME` has to be "." to denote it's the root entry. You want to be adding a… | |||||
281 | entry.fastInsert(KIO::UDSEntry::UDS_DISPLAY_NAME, i18n("Trash")); | ||||
281 | entry.fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR); | 282 | entry.fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR); | ||
282 | entry.fastInsert(KIO::UDSEntry::UDS_ACCESS, 0700); | 283 | entry.fastInsert(KIO::UDSEntry::UDS_ACCESS, 0700); | ||
283 | entry.fastInsert(KIO::UDSEntry::UDS_MIME_TYPE, QStringLiteral("inode/directory")); | 284 | entry.fastInsert(KIO::UDSEntry::UDS_MIME_TYPE, QStringLiteral("inode/directory")); | ||
285 | entry.fastInsert(KIO::UDSEntry::UDS_ICON_NAME, impl.isEmpty() ? QStringLiteral("user-trash") : QStringLiteral("user-trash-full") ); | ||||
284 | entry.fastInsert(KIO::UDSEntry::UDS_USER, m_userName); | 286 | entry.fastInsert(KIO::UDSEntry::UDS_USER, m_userName); | ||
285 | entry.fastInsert(KIO::UDSEntry::UDS_GROUP, m_groupName); | 287 | entry.fastInsert(KIO::UDSEntry::UDS_GROUP, m_groupName); | ||
286 | } | 288 | } | ||
287 | 289 | | |||
288 | void TrashProtocol::stat(const QUrl &url) | 290 | void TrashProtocol::stat(const QUrl &url) | ||
289 | { | 291 | { | ||
290 | INIT_IMPL; | 292 | INIT_IMPL; | ||
291 | const QString path = url.path(); | 293 | const QString path = url.path(); | ||
▲ Show 20 Lines • Show All 379 Lines • Show Last 20 Lines |
UDS_NAME has to be "." to denote it's the root entry. You want to be adding a UDS_DISPLAY_NAME entry here