summaryrefslogtreecommitdiffstats
path: root/kmail/messagecomposer.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-03-25 20:20:07 +0200
committerSlávek Banko <slavek.banko@axis.cz>2018-03-25 20:20:24 +0200
commitf9301c6c042546a86f28f2ddaccadca7bcf8b9a6 (patch)
tree173ae65f5292e37b3fec32edb26eb22cebc34ed5 /kmail/messagecomposer.cpp
parent3f26d326c9bd8fbd60e5d89e20a705c87a837b1f (diff)
downloadtdepim-f9301c6c042546a86f28f2ddaccadca7bcf8b9a6.tar.gz
tdepim-f9301c6c042546a86f28f2ddaccadca7bcf8b9a6.zip
kmail: Avoid setting charset on non-textual parts of emails
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 3479159c7ff5c918af12e29a32367843f336b57f)
Diffstat (limited to 'kmail/messagecomposer.cpp')
-rw-r--r--kmail/messagecomposer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/kmail/messagecomposer.cpp b/kmail/messagecomposer.cpp
index 2a82da9e4..9b5763dd0 100644
--- a/kmail/messagecomposer.cpp
+++ b/kmail/messagecomposer.cpp
@@ -1251,7 +1251,9 @@ void MessageComposer::composeInlineOpenPGPMessage( KMMessage& theMessage,
}
mOldBodyPart.setContentDisposition( "inline" );
mOldBodyPart.setOriginalContentTypeStr( oldContentType.utf8() );
- mOldBodyPart.setCharset(mCharset);
+ if (mOldBodyPart.type() == DwMime::kTypeText) {
+ mOldBodyPart.setCharset(mCharset);
+ }
addBodyAndAttachments( msg, splitInfo, false, false, mOldBodyPart, Kleo::InlineOpenPGPFormat );
mMessageList.push_back( msg );
if ( it == splitInfos.begin() ) {