From 1fe0ab05ae2bfe6505736f598bd535a71fb86a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20Knau=C3=9F?= Date: Mon, 17 Oct 2016 15:35:49 +0200 Subject: replace cid links with actuall content of the images --- framework/domain/mimetreeparser/interface.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'framework/domain/mimetreeparser/interface.cpp') 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 return d->parent; } +QByteArray MailMime::decodedContent() const +{ + if (!d->mNode) { + return QByteArray(); + } + return d->mNode->decodedContent(); +} + + class PartPrivate { public: @@ -581,7 +590,7 @@ void SinglePartPrivate::fillFrom(MimeTreeParser::AttachmentMessagePart::Ptr part q->reachParentD()->createMailMime(part.staticCast()); mType = q->mailMime()->mimetype().name().toUtf8(); mContent.clear(); - mContent.append(std::make_shared(part->text().toLocal8Bit(), q)); + mContent.append(std::make_shared(q->mailMime()->decodedContent(), q)); } SinglePart::SinglePart() -- cgit v1.2.3