From b252cffc8808153377d7536ece006f5df17577be Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 24 May 2017 07:03:39 +0200 Subject: Show attachment icon --- framework/qml/MailViewer.qml | 2 +- framework/src/domain/mime/attachmentmodel.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'framework') diff --git a/framework/qml/MailViewer.qml b/framework/qml/MailViewer.qml index aae43994..73dcc291 100644 --- a/framework/qml/MailViewer.qml +++ b/framework/qml/MailViewer.qml @@ -283,7 +283,7 @@ Rectangle { delegate: AttachmentDelegate { name: model.name - icon: "mail-attachment" + icon: model.iconName clip: true diff --git a/framework/src/domain/mime/attachmentmodel.cpp b/framework/src/domain/mime/attachmentmodel.cpp index e98c6fc0..2871579c 100644 --- a/framework/src/domain/mime/attachmentmodel.cpp +++ b/framework/src/domain/mime/attachmentmodel.cpp @@ -77,7 +77,7 @@ QHash AttachmentModel::roleNames() const roles[TypeRole] = "type"; roles[NameRole] = "name"; roles[SizeRole] = "size"; - roles[IconRole] = "icon"; + roles[IconRole] = "iconName"; roles[IsEncryptedRole] = "encrypted"; roles[IsSignedRole] = "signed"; return roles; @@ -114,7 +114,7 @@ QVariant AttachmentModel::data(const QModelIndex &index, int role) const case NameRole: return entry->mailMime()->filename(); case IconRole: - return QIcon::fromTheme(content->mailMime()->mimetype().iconName()); + return content->mailMime()->mimetype().iconName(); case SizeRole: return sizeHuman(content); case IsEncryptedRole: -- cgit v1.2.3