┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2017-01-12 14:23:01 +0100
committerKai Uwe Broulik <[email protected]>2017-01-12 14:23:12 +0100
commit0cad00c39aec4508688c87e520acc782b1001d1f (patch)
tree58e64d1d7a4d9b2be7a00ad00e6240ce919d77a4 /src
parent726515cfd43e3a1af61ab624d08f509e8e5f0a9f (diff)
Add document title to additional information
Allows showing the document title of e.g. a PDF alongside the file name BUG: 321356 Differential Revision: https://phabricator.kde.org/D3972
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 7b252a346..c35d164e1 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -2225,6 +2225,7 @@ const KFileItemModel::RoleInfoMap* KFileItemModel::rolesInfoMap(int& count)
{ "rating", RatingRole, I18N_NOOP2_NOSTRIP("@label", "Rating"), 0, 0, true, false },
{ "tags", TagsRole, I18N_NOOP2_NOSTRIP("@label", "Tags"), 0, 0, true, false },
{ "comment", CommentRole, I18N_NOOP2_NOSTRIP("@label", "Comment"), 0, 0, true, false },
+ { "title", TitleRole, I18N_NOOP2_NOSTRIP("@label", "Title"), I18N_NOOP2_NOSTRIP("@label", "Document"), true, true },
{ "wordCount", WordCountRole, I18N_NOOP2_NOSTRIP("@label", "Word Count"), I18N_NOOP2_NOSTRIP("@label", "Document"), true, true },
{ "lineCount", LineCountRole, I18N_NOOP2_NOSTRIP("@label", "Line Count"), I18N_NOOP2_NOSTRIP("@label", "Document"), true, true },
{ "imageSize", ImageSizeRole, I18N_NOOP2_NOSTRIP("@label", "Image Size"), I18N_NOOP2_NOSTRIP("@label", "Image"), true, true },
diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h
index 8a0df72b9..717afb9a7 100644
--- a/src/kitemviews/kfileitemmodel.h
+++ b/src/kitemviews/kfileitemmodel.h
@@ -284,7 +284,7 @@ private:
GroupRole, TypeRole, DestinationRole, PathRole,
// User visible roles available with Baloo:
CommentRole, TagsRole, RatingRole, ImageSizeRole, OrientationRole,
- WordCountRole, LineCountRole, ArtistRole, AlbumRole, DurationRole, TrackRole,
+ WordCountRole, TitleRole, LineCountRole, ArtistRole, AlbumRole, DurationRole, TrackRole,
OriginUrlRole,
// Non-visible roles:
IsDirRole, IsLinkRole, IsExpandedRole, IsExpandableRole, ExpandedParentsCountRole,
diff --git a/src/kitemviews/private/kbaloorolesprovider.cpp b/src/kitemviews/private/kbaloorolesprovider.cpp
index e0b889e6c..9f151df92 100644
--- a/src/kitemviews/private/kbaloorolesprovider.cpp
+++ b/src/kitemviews/private/kbaloorolesprovider.cpp
@@ -138,6 +138,7 @@ KBalooRolesProvider::KBalooRolesProvider() :
{ "rating", "rating" },
{ "tag", "tags" },
{ "comment", "comment" },
+ { "title", "title" },
{ "wordCount", "wordCount" },
{ "lineCount", "lineCount" },
{ "width", "imageSize" },