From e6f142e5e7563ebbcdc1bdf84c9ce87f11e01835 Mon Sep 17 00:00:00 2001 From: Eugene Popov Date: Wed, 20 Apr 2022 17:30:46 +0300 Subject: Add the ability to sort by file extension Currently, Dolphin doesn't have the ability to sort by file extension (sorting by type means that files will be sorted by mimetype but not by extension). This MR fixes this shortcoming. BUG: 429579 --- src/kitemviews/kfileitemmodel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/kitemviews/kfileitemmodel.h') diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index f82e91d49..f4c09b6c5 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -290,7 +290,7 @@ private: enum RoleType { // User visible roles: NoRole, NameRole, SizeRole, ModificationTimeRole, CreationTimeRole, AccessTimeRole, PermissionsRole, OwnerRole, - GroupRole, TypeRole, DestinationRole, PathRole, DeletionTimeRole, + GroupRole, TypeRole, ExtensionRole, DestinationRole, PathRole, DeletionTimeRole, // User visible roles available with Baloo: CommentRole, TagsRole, RatingRole, DimensionsRole, WidthRole, HeightRole, ImageDateTimeRole, OrientationRole, WordCountRole, TitleRole, AuthorRole, LineCountRole, ArtistRole, GenreRole, AlbumRole, DurationRole, TrackRole, ReleaseYearRole, @@ -527,6 +527,7 @@ private: inline bool KFileItemModel::isRoleValueNatural(RoleType roleType) { return (roleType == TypeRole || + roleType == ExtensionRole || roleType == TagsRole || roleType == CommentRole || roleType == TitleRole || -- cgit v1.3.1