diff options
Diffstat (limited to 'framework/domain/mimetreeparser')
-rw-r--r-- | framework/domain/mimetreeparser/interface.cpp | 11 | ||||
-rw-r--r-- | framework/domain/mimetreeparser/interface.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/framework/domain/mimetreeparser/interface.cpp b/framework/domain/mimetreeparser/interface.cpp index c2fd1e65..b5e29e6b 100644 --- a/framework/domain/mimetreeparser/interface.cpp +++ b/framework/domain/mimetreeparser/interface.cpp | |||
@@ -143,6 +143,15 @@ MailMime::Ptr MailMime::parent() const | |||
143 | return d->parent; | 143 | return d->parent; |
144 | } | 144 | } |
145 | 145 | ||
146 | QByteArray MailMime::decodedContent() const | ||
147 | { | ||
148 | if (!d->mNode) { | ||
149 | return QByteArray(); | ||
150 | } | ||
151 | return d->mNode->decodedContent(); | ||
152 | } | ||
153 | |||
154 | |||
146 | class PartPrivate | 155 | class PartPrivate |
147 | { | 156 | { |
148 | public: | 157 | public: |
@@ -581,7 +590,7 @@ void SinglePartPrivate::fillFrom(MimeTreeParser::AttachmentMessagePart::Ptr part | |||
581 | q->reachParentD()->createMailMime(part.staticCast<MimeTreeParser::TextMessagePart>()); | 590 | q->reachParentD()->createMailMime(part.staticCast<MimeTreeParser::TextMessagePart>()); |
582 | mType = q->mailMime()->mimetype().name().toUtf8(); | 591 | mType = q->mailMime()->mimetype().name().toUtf8(); |
583 | mContent.clear(); | 592 | mContent.clear(); |
584 | mContent.append(std::make_shared<Content>(part->text().toLocal8Bit(), q)); | 593 | mContent.append(std::make_shared<Content>(q->mailMime()->decodedContent(), q)); |
585 | } | 594 | } |
586 | 595 | ||
587 | SinglePart::SinglePart() | 596 | SinglePart::SinglePart() |
diff --git a/framework/domain/mimetreeparser/interface.h b/framework/domain/mimetreeparser/interface.h index cc6c68d2..f88271af 100644 --- a/framework/domain/mimetreeparser/interface.h +++ b/framework/domain/mimetreeparser/interface.h | |||
@@ -100,6 +100,8 @@ public: | |||
100 | // overwrite default charset with given charset | 100 | // overwrite default charset with given charset |
101 | QString encodedContent(QByteArray charset) const; | 101 | QString encodedContent(QByteArray charset) const; |
102 | 102 | ||
103 | QByteArray decodedContent() const; | ||
104 | |||
103 | bool isFirstTextPart() const; | 105 | bool isFirstTextPart() const; |
104 | bool isFirstPart() const; | 106 | bool isFirstPart() const; |
105 | bool isTopLevelPart() const; | 107 | bool isTopLevelPart() const; |