author | zautrix <zautrix> | 2004-11-07 17:35:51 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-11-07 17:35:51 (UTC) |
commit | d90d17044d7daf6677074b0964d59f94407157d5 (patch) (side-by-side diff) | |
tree | 82bf4f2001465637572534650769a864c15a6f7c /kmicromail/libmailwrapper/imapwrapper.cpp | |
parent | b6ef669713ee1d52adcfc9754dd039a4ff6675da (diff) | |
download | kdepimpi-d90d17044d7daf6677074b0964d59f94407157d5.zip kdepimpi-d90d17044d7daf6677074b0964d59f94407157d5.tar.gz kdepimpi-d90d17044d7daf6677074b0964d59f94407157d5.tar.bz2 |
some mail fixes and warnings removed
Diffstat (limited to 'kmicromail/libmailwrapper/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/imapwrapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp index 2a54381..da7065f 100644 --- a/kmicromail/libmailwrapper/imapwrapper.cpp +++ b/kmicromail/libmailwrapper/imapwrapper.cpp @@ -730,66 +730,66 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t int current_recursion,QValueList<int>recList,int current_count) { if (!body || current_recursion>=10) { return; } switch (body->bd_type) { case MAILIMAP_BODY_1PART: { QValueList<int>countlist = recList; countlist.append(current_count); RecPartP currentPart = new RecPart(); mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part; QString id(""); currentPart->setPositionlist(countlist); for (unsigned int j = 0; j < countlist.count();++j) { id+=(j>0?" ":""); id+=QString("%1").arg(countlist[j]); } //odebug << "ID = " << id.latin1() << "" << oendl; currentPart->setIdentifier(id); fillSinglePart(currentPart,part1); /* important: Check for is NULL 'cause a body can be empty! And we put it only into the mail if it is the FIRST part */ if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_TEXT && target_body->Bodytext().isNull() && countlist[0]==1) { QString body_text = fetchTextPart(mail,countlist,true,currentPart->Encoding()); size_t index = 0; char*res = 0; int err = MAILIMF_NO_ERROR; QString charset = currentPart->searchParamter( "charset"); qDebug("CHARSET %s ",charset.latin1() ); - //if ( false ) { - if ( !charset.isEmpty() ) { + if ( false ) { + //if ( !charset.isEmpty() ) { target_body->setCharset( charset ); //err = mailmime_encoded_phrase_parse("iso-8859-1", // text, strlen(text),&index, "iso-8859-1",&res); err = mailmime_encoded_phrase_parse(charset.latin1(), body_text.latin1(), body_text.length(),&index, "utf-8",&res); if (err == MAILIMF_NO_ERROR && res && strlen(res)) { //qDebug("res %d %s ", index, res); body_text = QString::fromUtf8(res); } if (res) free(res); } //qDebug("encoding %d text %s ",currentPart->Encoding().latin1(), body_text.latin1() ); target_body->setDescription(currentPart); target_body->setBodytext(body_text); if (countlist.count()>1) { target_body->addPart(currentPart); } } else { target_body->addPart(currentPart); } if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_MSG) { traverseBody(mail,part1->bd_data.bd_type_msg->bd_body,target_body,current_recursion+1,countlist); } } break; case MAILIMAP_BODY_MPART: { QValueList<int>countlist = recList; clistcell*current=0; mailimap_body*current_body=0; unsigned int ccount = 1; mailimap_body_type_mpart*mailDescription = body->bd_data.bd_body_mpart; |