diff options
| author | Kai Uwe Broulik <[email protected]> | 2017-06-20 11:32:29 +0200 |
|---|---|---|
| committer | Kai Uwe Broulik <[email protected]> | 2017-06-20 11:32:29 +0200 |
| commit | 0d2f86de18390169286c9ef928c0ca388e3ccd2d (patch) | |
| tree | d7dc7cd6118dddfdc4f4918451ee12a06e0cb9b4 /src/kitemviews/kfileitemmodel.h | |
| parent | 96eff55e75bfd0f1e3f866b4af14f3778e9002b3 (diff) | |
Support "Deletion Time" role in Trash
This allows to sort by and show (both as additional data in icon view and column in column
view) deletion date of files in Trash.
CHANGELOG: It is now possible to view and sort by "Deletion Time" in Trash
BUG: 153492
FIXED-IN: 17.08.0
Differential Revision: https://phabricator.kde.org/D6269
Diffstat (limited to 'src/kitemviews/kfileitemmodel.h')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 9814ae55d..c73df9050 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -30,6 +30,8 @@ #include <QHash> #include <QSet> +#include <functional> + class KFileItemModelDirLister; class QTimer; @@ -281,7 +283,7 @@ private: enum RoleType { // User visible roles: NoRole, NameRole, SizeRole, ModificationTimeRole, AccessTimeRole, PermissionsRole, OwnerRole, - GroupRole, TypeRole, DestinationRole, PathRole, + GroupRole, TypeRole, DestinationRole, PathRole, DeletionTimeRole, // User visible roles available with Baloo: CommentRole, TagsRole, RatingRole, ImageSizeRole, OrientationRole, WordCountRole, TitleRole, LineCountRole, ArtistRole, AlbumRole, DurationRole, TrackRole, @@ -383,7 +385,7 @@ private: QList<QPair<int, QVariant> > nameRoleGroups() const; QList<QPair<int, QVariant> > sizeRoleGroups() const; - QList<QPair<int, QVariant> > timeRoleGroups(KFileItem::FileTimes which) const; + QList<QPair<int, QVariant> > timeRoleGroups(std::function<QDateTime(const ItemData *)> fileTimeCb) const; QList<QPair<int, QVariant> > permissionRoleGroups() const; QList<QPair<int, QVariant> > ratingRoleGroups() const; QList<QPair<int, QVariant> > genericStringRoleGroups(const QByteArray& typeForRole) const; |
