diff options
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 | } |