author | alwin <alwin> | 2003-12-16 02:13:09 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-16 02:13:09 (UTC) |
commit | f42c15f884d4377bc99d73e16fa1722b0fb2a4d3 (patch) (unidiff) | |
tree | 0ecd625c8a5913285fa31a050a9a6e49c13fbe4b /noncore/net/mail/imapwrapper.cpp | |
parent | 32d48372f7b5ec9e4586ea74cc444838b157248e (diff) | |
download | opie-f42c15f884d4377bc99d73e16fa1722b0fb2a4d3.zip opie-f42c15f884d4377bc99d73e16fa1722b0fb2a4d3.tar.gz opie-f42c15f884d4377bc99d73e16fa1722b0fb2a4d3.tar.bz2 |
quoted-printable text will be decoded for display
Diffstat (limited to 'noncore/net/mail/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp index ad95384..a4e6228 100644 --- a/noncore/net/mail/imapwrapper.cpp +++ b/noncore/net/mail/imapwrapper.cpp | |||
@@ -394,2 +394,5 @@ void IMAPwrapper::searchBodyText(const RecMail&mail,mailimap_body_type_1part*mai | |||
394 | body_text = fetchPart(mail,path,true); | 394 | body_text = fetchPart(mail,path,true); |
395 | if (singlePart.Encoding()=="quoted-printable") { | ||
396 | body_text = decode_quoted_printable(body_text.latin1()); | ||
397 | } | ||
395 | target_body.setBodytext(body_text); | 398 | target_body.setBodytext(body_text); |
@@ -401,2 +404,5 @@ void IMAPwrapper::searchBodyText(const RecMail&mail,mailimap_body_type_1part*mai | |||
401 | body_text = fetchPart(mail,path,true); | 404 | body_text = fetchPart(mail,path,true); |
405 | if (singlePart.Encoding()=="quoted-printable") { | ||
406 | body_text = decode_quoted_printable(body_text.latin1()); | ||
407 | } | ||
402 | target_body.setBodytext(body_text); | 408 | target_body.setBodytext(body_text); |
@@ -457,3 +463,3 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) | |||
457 | 463 | ||
458 | QString IMAPwrapper::fetchPart(const RecMail&mail,const QValueList<int>&path,bool internal_call) | 464 | QString IMAPwrapper::fetchPart(const RecMail&mail,const QValueList<int>&path,bool internal_call,const QString&enc) |
459 | { | 465 | { |
@@ -509,3 +515,7 @@ QString IMAPwrapper::fetchPart(const RecMail&mail,const QValueList<int>&path,boo | |||
509 | if (text) { | 515 | if (text) { |
510 | body = QString(text); | 516 | if (enc=="quoted-printable") { |
517 | body = decode_quoted_printable(text); | ||
518 | } else { | ||
519 | body = QString(text); | ||
520 | } | ||
511 | free(text); | 521 | free(text); |
@@ -549,3 +559,3 @@ void IMAPwrapper::searchBodyText(const RecMail&mail,mailimap_body_type_mpart*mai | |||
549 | if (currentPart.Type()=="text" && target_body.Bodytext().isNull() ) { | 559 | if (currentPart.Type()=="text" && target_body.Bodytext().isNull() ) { |
550 | QString body_text = fetchPart(mail,clist,true); | 560 | QString body_text = fetchPart(mail,clist,true,currentPart.Encoding()); |
551 | target_body.setDescription(currentPart); | 561 | target_body.setDescription(currentPart); |
@@ -707,3 +717,3 @@ QString IMAPwrapper::fetchPart(const RecMail&mail,const RecPart&part) | |||
707 | { | 717 | { |
708 | return fetchPart(mail,part.Positionlist(),false); | 718 | return fetchPart(mail,part.Positionlist(),false,part.Encoding()); |
709 | } | 719 | } |