#include <KIO/Job>
#include <kio_version.h>
#include <KLocalizedString>
-#include <KLazyLocalizedString>
#include <KUrlMimeData>
#include <QElapsedTimer>
data.insert(sharedValue("text"), item.text());
}
- if (m_requestRole[ExtensionRole]) {
+ if (m_requestRole[ExtensionRole] && !isDir) {
data.insert(sharedValue("extension"), QFileInfo(item.name()).suffix());
}
break;
}
+ case AccessTimeRole: {
+ const long long dateTimeA = itemA.entry().numberValue(KIO::UDSEntry::UDS_ACCESS_TIME, -1);
+ const long long dateTimeB = itemB.entry().numberValue(KIO::UDSEntry::UDS_ACCESS_TIME, -1);
+ if (dateTimeA < dateTimeB) {
+ return -1;
+ } else if (dateTimeA > dateTimeB) {
+ return +1;
+ }
+ break;
+ }
+
case CreationTimeRole: {
const long long dateTimeA = itemA.entry().numberValue(KIO::UDSEntry::UDS_CREATION_TIME, -1);
const long long dateTimeB = itemB.entry().numberValue(KIO::UDSEntry::UDS_CREATION_TIME, -1);
{ "creationtime", CreationTimeRole, kli18nc("@label", "Created"), KLazyLocalizedString(), false, false },
{ "accesstime", AccessTimeRole, kli18nc("@label", "Accessed"), KLazyLocalizedString(), false, false },
{ "type", TypeRole, kli18nc("@label", "Type"), KLazyLocalizedString(), false, false },
- { "extension", ExtensionRole, kli18nc("@label", "Extension"), KLazyLocalizedString(), false, false },
{ "rating", RatingRole, kli18nc("@label", "Rating"), KLazyLocalizedString(), true, false },
{ "tags", TagsRole, kli18nc("@label", "Tags"), KLazyLocalizedString(), true, false },
{ "comment", CommentRole, kli18nc("@label", "Comment"), KLazyLocalizedString(), true, false },
{ "aspectRatio", AspectRatioRole, kli18nc("@label", "Aspect Ratio"), kli18nc("@label", "Video"), true, true },
{ "frameRate", FrameRateRole, kli18nc("@label", "Frame Rate"), kli18nc("@label", "Video"), true, true },
{ "path", PathRole, kli18nc("@label", "Path"), kli18nc("@label", "Other"), false, false },
+ { "extension", ExtensionRole, kli18nc("@label", "File Extension"), kli18nc("@label", "Other"), false, false },
{ "deletiontime", DeletionTimeRole, kli18nc("@label", "Deletion Time"), kli18nc("@label", "Other"), false, false },
{ "destination", DestinationRole, kli18nc("@label", "Link Destination"), kli18nc("@label", "Other"), false, false },
{ "originUrl", OriginUrlRole, kli18nc("@label", "Downloaded From"), kli18nc("@label", "Other"), true, false },