diff options
-rw-r--r-- | framework/mail/maillistmodel.cpp | 3 | ||||
-rw-r--r-- | framework/mail/maillistmodel.h | 3 |
2 files changed, 5 insertions, 1 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 | } |
diff --git a/framework/mail/maillistmodel.h b/framework/mail/maillistmodel.h index 572aa80d..69b986a2 100644 --- a/framework/mail/maillistmodel.h +++ b/framework/mail/maillistmodel.h | |||
@@ -22,7 +22,8 @@ public: | |||
22 | SenderName, | 22 | SenderName, |
23 | Date, | 23 | Date, |
24 | Unread, | 24 | Unread, |
25 | Important | 25 | Important, |
26 | Id | ||
26 | }; | 27 | }; |
27 | 28 | ||
28 | QHash<int, QByteArray> roleNames() const; | 29 | QHash<int, QByteArray> roleNames() const; |