diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-08 14:14:15 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-08 14:14:15 +0100 |
commit | 394d3d9803c101014fb7f521155b0a9ed6809454 (patch) | |
tree | 7ef3dd33192c0a4ee299581ec41a9f94fac21cca /framework/mail/folderlistmodel.cpp | |
parent | cdb9f957d24ebb255c3eb6b6034da9a8a403f65c (diff) | |
download | kube-394d3d9803c101014fb7f521155b0a9ed6809454.tar.gz kube-394d3d9803c101014fb7f521155b0a9ed6809454.zip |
Fixed mapping to result model
The result model exposes the different properties as columns
Diffstat (limited to 'framework/mail/folderlistmodel.cpp')
-rw-r--r-- | framework/mail/folderlistmodel.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/mail/folderlistmodel.cpp b/framework/mail/folderlistmodel.cpp index 8c513b64..b0969060 100644 --- a/framework/mail/folderlistmodel.cpp +++ b/framework/mail/folderlistmodel.cpp | |||
@@ -29,11 +29,12 @@ QHash< int, QByteArray > FolderListModel::roleNames() const | |||
29 | 29 | ||
30 | QVariant FolderListModel::data(const QModelIndex &idx, int role) const | 30 | QVariant FolderListModel::data(const QModelIndex &idx, int role) const |
31 | { | 31 | { |
32 | auto srcIdx = mapToSource(idx); | ||
32 | switch (role) { | 33 | switch (role) { |
33 | case Name: | 34 | case Name: |
34 | return mapToSource(idx).data(Qt::DisplayRole).toString(); | 35 | return srcIdx.sibling(srcIdx.row(), 0).data(Qt::DisplayRole).toString(); |
35 | case Icon: | 36 | case Icon: |
36 | return mapToSource(idx).data(Qt::DisplayRole).toString(); | 37 | return srcIdx.sibling(srcIdx.row(), 1).data(Qt::DisplayRole).toString(); |
37 | } | 38 | } |
38 | return QIdentityProxyModel::data(idx, role); | 39 | return QIdentityProxyModel::data(idx, role); |
39 | } | 40 | } |