┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathaniel Graham <[email protected]>2017-09-13 10:35:18 +0500
committerAlexey Min <[email protected]>2017-09-13 10:45:12 +0500
commitd1b68db1a348f22eb8f6b6ffaae5097820385e83 (patch)
tree996a0375d08c0ef0dcfda8c4297b13c6d13a0094 /src
parent64973a29979bc3201df5517a0db7e6ebdb2e5505 (diff)
Add "Release Year" column to Dolphin's Details view
Summary: Adds a "Release Year" column to Dolphin's Details view. BUG: 384317 Test Plan: Tested in a KDE Neon VM. Reviewers: aacid, broulik, #kde_applications, #dolphin, alexeymin, emmanuelp Reviewed By: #dolphin, alexeymin, emmanuelp Differential Revision: https://phabricator.kde.org/D7776
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/kfileitemmodel.cpp1
-rw-r--r--src/kitemviews/kfileitemmodel.h2
-rw-r--r--src/kitemviews/private/kbaloorolesprovider.cpp1
3 files changed, 3 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 6ca9fce6c..86b010f62 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -2315,6 +2315,7 @@ const KFileItemModel::RoleInfoMap* KFileItemModel::rolesInfoMap(int& count)
{ "album", AlbumRole, I18N_NOOP2_NOSTRIP("@label", "Album"), I18N_NOOP2_NOSTRIP("@label", "Audio"), true, true },
{ "duration", DurationRole, I18N_NOOP2_NOSTRIP("@label", "Duration"), I18N_NOOP2_NOSTRIP("@label", "Audio"), true, true },
{ "track", TrackRole, I18N_NOOP2_NOSTRIP("@label", "Track"), I18N_NOOP2_NOSTRIP("@label", "Audio"), true, true },
+ { "releaseYear", ReleaseYearRole, I18N_NOOP2_NOSTRIP("@label", "Release Year"), I18N_NOOP2_NOSTRIP("@label", "Audio"), true, true },
{ "path", PathRole, I18N_NOOP2_NOSTRIP("@label", "Path"), I18N_NOOP2_NOSTRIP("@label", "Other"), false, false },
{ "deletiontime",DeletionTimeRole,I18N_NOOP2_NOSTRIP("@label", "Deletion Time"), I18N_NOOP2_NOSTRIP("@label", "Other"), false, false },
{ "destination", DestinationRole, I18N_NOOP2_NOSTRIP("@label", "Link Destination"), I18N_NOOP2_NOSTRIP("@label", "Other"), false, false },
diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h
index c18ced8e3..87c3cd131 100644
--- a/src/kitemviews/kfileitemmodel.h
+++ b/src/kitemviews/kfileitemmodel.h
@@ -286,7 +286,7 @@ private:
GroupRole, TypeRole, DestinationRole, PathRole, DeletionTimeRole,
// User visible roles available with Baloo:
CommentRole, TagsRole, RatingRole, ImageSizeRole, OrientationRole,
- WordCountRole, TitleRole, LineCountRole, ArtistRole, GenreRole, AlbumRole, DurationRole, TrackRole,
+ WordCountRole, TitleRole, LineCountRole, ArtistRole, GenreRole, AlbumRole, DurationRole, TrackRole, ReleaseYearRole,
OriginUrlRole,
// Non-visible roles:
IsDirRole, IsLinkRole, IsHiddenRole, IsExpandedRole, IsExpandableRole, ExpandedParentsCountRole,
diff --git a/src/kitemviews/private/kbaloorolesprovider.cpp b/src/kitemviews/private/kbaloorolesprovider.cpp
index 59aadcee0..808a9ba7c 100644
--- a/src/kitemviews/private/kbaloorolesprovider.cpp
+++ b/src/kitemviews/private/kbaloorolesprovider.cpp
@@ -149,6 +149,7 @@ KBalooRolesProvider::KBalooRolesProvider() :
{ "genre", "genre" },
{ "album", "album" },
{ "duration", "duration" },
+ { "releaseYear", "releaseYear" },
{ "trackNumber", "track" },
{ "originUrl", "originUrl" }
};