summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/imapwrapper.cpp
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper/imapwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index 110583f..ae667ec 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -742,24 +742,25 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t
742 currentPart->setPositionlist(countlist); 742 currentPart->setPositionlist(countlist);
743 for (unsigned int j = 0; j < countlist.count();++j) { 743 for (unsigned int j = 0; j < countlist.count();++j) {
744 id+=(j>0?" ":""); 744 id+=(j>0?" ":"");
745 id+=QString("%1").arg(countlist[j]); 745 id+=QString("%1").arg(countlist[j]);
746 } 746 }
747 //odebug << "ID = " << id.latin1() << "" << oendl; 747 //odebug << "ID = " << id.latin1() << "" << oendl;
748 currentPart->setIdentifier(id); 748 currentPart->setIdentifier(id);
749 fillSinglePart(currentPart,part1); 749 fillSinglePart(currentPart,part1);
750 /* important: Check for is NULL 'cause a body can be empty! 750 /* important: Check for is NULL 'cause a body can be empty!
751 And we put it only into the mail if it is the FIRST part */ 751 And we put it only into the mail if it is the FIRST part */
752 if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_TEXT && target_body->Bodytext().isNull() && countlist[0]==1) { 752 if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_TEXT && target_body->Bodytext().isNull() && countlist[0]==1) {
753 QString body_text = fetchTextPart(mail,countlist,true,currentPart->Encoding()); 753 QString body_text = fetchTextPart(mail,countlist,true,currentPart->Encoding());
754 //qDebug("encoding %d text %s ",currentPart->Encoding().latin1(), body_text.latin1() );
754 target_body->setDescription(currentPart); 755 target_body->setDescription(currentPart);
755 target_body->setBodytext(body_text); 756 target_body->setBodytext(body_text);
756 if (countlist.count()>1) { 757 if (countlist.count()>1) {
757 target_body->addPart(currentPart); 758 target_body->addPart(currentPart);
758 } 759 }
759 } else { 760 } else {
760 target_body->addPart(currentPart); 761 target_body->addPart(currentPart);
761 } 762 }
762 if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_MSG) { 763 if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_MSG) {
763 traverseBody(mail,part1->bd_data.bd_type_msg->bd_body,target_body,current_recursion+1,countlist); 764 traverseBody(mail,part1->bd_data.bd_type_msg->bd_body,target_body,current_recursion+1,countlist);
764 } 765 }
765 } 766 }