From b6ef669713ee1d52adcfc9754dd039a4ff6675da Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 07 Nov 2004 10:11:25 +0000 Subject: encoding fixes --- (limited to 'kmicromail/libmailwrapper/imapwrapper.cpp') diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp index eb2b47d..2a54381 100644 --- a/kmicromail/libmailwrapper/imapwrapper.cpp +++ b/kmicromail/libmailwrapper/imapwrapper.cpp @@ -50,7 +50,7 @@ void IMAPwrapper::imap_progress( size_t current, size_t maximum ) //qDebug("imap progress %d of %d ",current,maximum ); //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum)); //qApp->processEvents() - static int last = 0; + static unsigned int last = 0; if ( last != current ) IMAPwrapper::progress(); last = current; @@ -289,10 +289,10 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueListdata; + msg_att = (mailimap_msg_att*)current->data; RecMail*m = parse_list_result(msg_att); if (m) { - if ( maxSizeInKb == 0 || m->Msgsize()<=maxSizeInKb*1024 ) { + if ( maxSizeInKb == 0 || m->Msgsize()<=(unsigned int ) maxSizeInKb*1024 ) { m->setNumber(i); m->setMbox(mailbox); m->setWrapper(this); @@ -415,7 +415,7 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) clistcell *current,*c,*cf; mailimap_msg_att_dynamic*flist; mailimap_flag_fetch*cflag; - int size; + int size = 0; QBitArray mFlags(7); QStringList addresslist; @@ -761,6 +761,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t qDebug("CHARSET %s ",charset.latin1() ); //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(), @@ -1182,7 +1183,7 @@ int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,cons login(); if (!m_imap) {return 0;} QString pre = account->getPrefix(); - if (delemiter.length()>0 && pre.findRev(delemiter)!=pre.length()-1) { + if (delemiter.length()>0 && pre.findRev(delemiter)!=((int)pre.length())-1) { pre+=delemiter; } if (parentfolder) { -- cgit v0.9.0.2