summaryrefslogtreecommitdiffstats
path: root/framework/mail/maillistmodel.cpp
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2015-12-17 16:53:48 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2015-12-17 16:53:48 +0100
commitad1dd41fc444cf598c1dbfec44a8ce348cb2bb73 (patch)
tree1c1c4a677b8589db2de915d195b23b7ee580cf00 /framework/mail/maillistmodel.cpp
parent5ac5f26a109cbf985b35d11fe6392d5fcb3a5050 (diff)
downloadkube-ad1dd41fc444cf598c1dbfec44a8ce348cb2bb73.tar.gz
kube-ad1dd41fc444cf598c1dbfec44a8ce348cb2bb73.zip
expose mail id in maillist model
Diffstat (limited to 'framework/mail/maillistmodel.cpp')
-rw-r--r--framework/mail/maillistmodel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/framework/mail/maillistmodel.cpp b/framework/mail/maillistmodel.cpp
index 144c1970..2b2d2aeb 100644
--- a/framework/mail/maillistmodel.cpp
+++ b/framework/mail/maillistmodel.cpp
@@ -21,6 +21,7 @@ QHash< int, QByteArray > MailListModel::roleNames() const
21 roles[Date] = "date"; 21 roles[Date] = "date";
22 roles[Unread] = "unread"; 22 roles[Unread] = "unread";
23 roles[Important] = "important"; 23 roles[Important] = "important";
24 roles[Id] = "id";
24 25
25 return roles; 26 return roles;
26} 27}
@@ -41,6 +42,8 @@ QVariant MailListModel::data(const QModelIndex &idx, int role) const
41 return srcIdx.sibling(srcIdx.row(), 4).data(Qt::DisplayRole).toString(); 42 return srcIdx.sibling(srcIdx.row(), 4).data(Qt::DisplayRole).toString();
42 case Important: 43 case Important:
43 return srcIdx.sibling(srcIdx.row(), 5).data(Qt::DisplayRole).toString(); 44 return srcIdx.sibling(srcIdx.row(), 5).data(Qt::DisplayRole).toString();
45 case Id:
46 return srcIdx.data(Akonadi2::Store::DomainObjectBaseRole).value<Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier();
44 } 47 }
45 return QIdentityProxyModel::data(idx, role); 48 return QIdentityProxyModel::data(idx, role);
46} 49}