summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/mail/folderlistmodel.cpp4
-rw-r--r--framework/mail/folderlistmodel.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/framework/mail/folderlistmodel.cpp b/framework/mail/folderlistmodel.cpp
index b0969060..86633de4 100644
--- a/framework/mail/folderlistmodel.cpp
+++ b/framework/mail/folderlistmodel.cpp
@@ -1,5 +1,6 @@
1#include "folderlistmodel.h" 1#include "folderlistmodel.h"
2#include <akonadi2common/clientapi.h> 2#include <akonadi2common/clientapi.h>
3#include <akonadi2common/applicationdomaintype.h>
3 4
4FolderListModel::FolderListModel(QObject *parent) : QIdentityProxyModel() 5FolderListModel::FolderListModel(QObject *parent) : QIdentityProxyModel()
5{ 6{
@@ -23,6 +24,7 @@ QHash< int, QByteArray > FolderListModel::roleNames() const
23 24
24 roles[Name] = "name"; 25 roles[Name] = "name";
25 roles[Icon] = "icon"; 26 roles[Icon] = "icon";
27 roles[Id] = "id";
26 28
27 return roles; 29 return roles;
28} 30}
@@ -35,6 +37,8 @@ QVariant FolderListModel::data(const QModelIndex &idx, int role) const
35 return srcIdx.sibling(srcIdx.row(), 0).data(Qt::DisplayRole).toString(); 37 return srcIdx.sibling(srcIdx.row(), 0).data(Qt::DisplayRole).toString();
36 case Icon: 38 case Icon:
37 return srcIdx.sibling(srcIdx.row(), 1).data(Qt::DisplayRole).toString(); 39 return srcIdx.sibling(srcIdx.row(), 1).data(Qt::DisplayRole).toString();
40 case Id:
41 return QString("some id");
38 } 42 }
39 return QIdentityProxyModel::data(idx, role); 43 return QIdentityProxyModel::data(idx, role);
40} 44}
diff --git a/framework/mail/folderlistmodel.h b/framework/mail/folderlistmodel.h
index 9a782327..829bebff 100644
--- a/framework/mail/folderlistmodel.h
+++ b/framework/mail/folderlistmodel.h
@@ -17,7 +17,8 @@ public:
17 17
18 enum Roles { 18 enum Roles {
19 Name = Qt::UserRole + 1, 19 Name = Qt::UserRole + 1,
20 Icon 20 Icon,
21 Id
21 }; 22 };
22 23
23 QHash<int, QByteArray> roleNames() const; 24 QHash<int, QByteArray> roleNames() const;