diff options
author | Sandro Knauß <sknauss@kde.org> | 2016-10-17 12:24:32 +0200 |
---|---|---|
committer | Sandro Knauß <sknauss@kde.org> | 2016-10-17 12:24:32 +0200 |
commit | 988f0fe074faef56c053742fb582d0bb7b980d90 (patch) | |
tree | ca53e1434b6f495d53620b2aebc065c8e168993d /framework/domain/mimetreeparser/interface.cpp | |
parent | b40e6c476e54c5dab834c4d01936d1f7bc33c60e (diff) | |
download | kube-988f0fe074faef56c053742fb582d0bb7b980d90.tar.gz kube-988f0fe074faef56c053742fb582d0bb7b980d90.zip |
do not include multipart/related in attachmentlist
Diffstat (limited to 'framework/domain/mimetreeparser/interface.cpp')
-rw-r--r-- | framework/domain/mimetreeparser/interface.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/framework/domain/mimetreeparser/interface.cpp b/framework/domain/mimetreeparser/interface.cpp index 596dc152..ab56f800 100644 --- a/framework/domain/mimetreeparser/interface.cpp +++ b/framework/domain/mimetreeparser/interface.cpp | |||
@@ -818,12 +818,24 @@ QVector<Part::Ptr> Parser::collectAttachmentParts() const | |||
818 | } | 818 | } |
819 | 819 | ||
820 | { | 820 | { |
821 | const auto parent = content->parent(); | 821 | QMimeDatabase mimeDb; |
822 | auto _mime = content->parent()->mailMime(); | ||
823 | const auto parent = _mime->parent(); | ||
822 | if (parent) { | 824 | if (parent) { |
823 | const auto _mime = parent->mailMime(); | 825 | const auto mimetype = parent->mimetype(); |
826 | if (mimetype == mimeDb.mimeTypeForName("multipart/related")) { | ||
827 | return false; | ||
828 | } | ||
829 | } | ||
830 | while (_mime) { | ||
824 | if (_mime && (_mime->isTopLevelPart() || _mime->isFirstTextPart())) { | 831 | if (_mime && (_mime->isTopLevelPart() || _mime->isFirstTextPart())) { |
825 | return false; | 832 | return false; |
826 | } | 833 | } |
834 | if (_mime->isFirstPart()) { | ||
835 | _mime = _mime->parent(); | ||
836 | } else { | ||
837 | break; | ||
838 | } | ||
827 | } | 839 | } |
828 | } | 840 | } |
829 | const auto cd = mime->disposition(); | 841 | const auto cd = mime->disposition(); |