summaryrefslogtreecommitdiffstats
path: root/framework/mail/folderlistmodel.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-03 20:31:10 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-03 20:31:10 +0100
commitdd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff (patch)
treedfcef3671c7f36d762f74b4226477fe6978688f2 /framework/mail/folderlistmodel.cpp
parentdea41f0345188d776522e5b91ba25d25c418e581 (diff)
downloadkube-dd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff.tar.gz
kube-dd09ca9ef4bb9780b953d6dd2999dbefe50bd1ff.zip
Instead of using controllers, directly use the models
...and connect components via properties
Diffstat (limited to 'framework/mail/folderlistmodel.cpp')
-rw-r--r--framework/mail/folderlistmodel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/framework/mail/folderlistmodel.cpp b/framework/mail/folderlistmodel.cpp
index 0240d95a..0f66c46f 100644
--- a/framework/mail/folderlistmodel.cpp
+++ b/framework/mail/folderlistmodel.cpp
@@ -25,6 +25,7 @@ QHash< int, QByteArray > FolderListModel::roleNames() const
25 roles[Name] = "name"; 25 roles[Name] = "name";
26 roles[Icon] = "icon"; 26 roles[Icon] = "icon";
27 roles[Id] = "id"; 27 roles[Id] = "id";
28 roles[DomainObject] = "domainObject";
28 29
29 return roles; 30 return roles;
30} 31}
@@ -39,6 +40,8 @@ QVariant FolderListModel::data(const QModelIndex &idx, int role) const
39 return srcIdx.sibling(srcIdx.row(), 1).data(Qt::DisplayRole).toString(); 40 return srcIdx.sibling(srcIdx.row(), 1).data(Qt::DisplayRole).toString();
40 case Id: 41 case Id:
41 return srcIdx.data(Akonadi2::Store::DomainObjectBaseRole).value<Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier(); 42 return srcIdx.data(Akonadi2::Store::DomainObjectBaseRole).value<Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier();
43 case DomainObject:
44 return srcIdx.data(Akonadi2::Store::DomainObjectRole);
42 } 45 }
43 return QIdentityProxyModel::data(idx, role); 46 return QIdentityProxyModel::data(idx, role);
44} 47}