author | zautrix <zautrix> | 2004-10-31 12:28:03 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-31 12:28:03 (UTC) |
commit | bed831cc1a38d38a4c5b9329bf37b1c663142c23 (patch) (side-by-side diff) | |
tree | db12b81ea6cee0cac347c801798d759dfe24acfb /kmicromail/viewmail.cpp | |
parent | 553bd9acf9879a77c5fa925155f73afbe8a9af41 (diff) | |
download | kdepimpi-bed831cc1a38d38a4c5b9329bf37b1c663142c23.zip kdepimpi-bed831cc1a38d38a4c5b9329bf37b1c663142c23.tar.gz kdepimpi-bed831cc1a38d38a4c5b9329bf37b1c663142c23.tar.bz2 |
ompi utf8 fixes
-rw-r--r-- | kmicromail/viewmail.cpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index f1e0225..2093678 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp @@ -98,7 +98,8 @@ void ViewMail::setBody(const RecBodyP&body ) { m_body = body; - m_mail[2] = body->Bodytext(); + m_mail[2] = QString::fromUtf8( body->Bodytext().latin1() ); + // qDebug("********text %s ",m_mail[2].latin1() ); attachbutton->setEnabled(body->Parts().count()>0); attachments->setEnabled(body->Parts().count()>0); if (body->Parts().count()==0) @@ -300,10 +301,10 @@ void ViewMail::setMail(const RecMailP&mail ) m_recMail = mail; - m_mail[0] = mail->getFrom(); - m_mail[1] = mail->getSubject(); - m_mail[3] = mail->getDate(); - m_mail[4] = mail->Msgid(); + m_mail[0] = QString::fromUtf8( mail->getFrom().latin1() ); + m_mail[1] = QString::fromUtf8( mail->getSubject().latin1() ); + m_mail[3] = QString::fromUtf8( mail->getDate().latin1() ); + m_mail[4] = QString::fromUtf8( mail->Msgid().latin1() ); m_mail2[0] = mail->To(); m_mail2[1] = mail->CC(); @@ -348,18 +349,11 @@ void ViewMail::setText() QString ccString; QString bccString; - for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it ) - { - toString += (*it); - } - for ( QStringList::Iterator it = ( m_mail2[1] ).begin(); it != ( m_mail2[1] ).end(); ++it ) - { - ccString += (*it); - } - for ( QStringList::Iterator it = ( m_mail2[2] ).begin(); it != ( m_mail2[2] ).end(); ++it ) - { - bccString += (*it); - } + + toString = QString::fromUtf8(m_mail2[0].join(",").latin1()); + ccString = QString::fromUtf8(m_mail2[1].join(",").latin1()); + bccString = QString::fromUtf8(m_mail2[2].join(",").latin1()); + setCaption( i18n("E-Mail by %1").arg( m_mail[0] ) ); @@ -456,9 +450,9 @@ void ViewMail::slotReply() Settings *settings = new Settings(); ComposeMail composer( settings ,this, 0, true); if (m_recMail->Replyto().isEmpty()) { - composer.setTo( m_recMail->getFrom()); + composer.setTo( QString::fromUtf8( m_recMail->getFrom().latin1())); } else { - composer.setTo( m_recMail->Replyto()); + composer.setTo( QString::fromUtf8( m_recMail->Replyto().latin1())); } composer.setSubject( prefix + m_mail[1] ); composer.setMessage( rtext ); @@ -468,8 +462,9 @@ void ViewMail::slotReply() { m_recMail->Wrapper()->answeredMail(m_recMail); } + delete settings; } - + void ViewMail::slotForward() { if (!m_gotBody) |