┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.h
diff options
context:
space:
mode:
authorEugene Popov <[email protected]>2022-04-20 17:30:46 +0300
committerEugene Popov <[email protected]>2022-04-26 13:42:04 +0300
commite6f142e5e7563ebbcdc1bdf84c9ce87f11e01835 (patch)
tree466862c5aaee5aab15953f84762f257c9e20ade7 /src/kitemviews/kfileitemmodel.h
parentc88ce580e6ad720342e7efec2c7e24d8362b648c (diff)
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
Diffstat (limited to 'src/kitemviews/kfileitemmodel.h')
-rw-r--r--src/kitemviews/kfileitemmodel.h3
1 files changed, 2 insertions, 1 deletions
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 ||