summaryrefslogtreecommitdiffabout
path: root/kmicromail/viewmail.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/viewmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/viewmail.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 2093678..4883231 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -85,33 +85,33 @@ AttachItem* ViewMail::lastChild(AttachItem*parent)
{
if (!parent) return 0;
AttachItem* item = (AttachItem*)parent->firstChild();
if (!item) return item;
AttachItem*temp=0;
while( (temp=(AttachItem*)item->nextSibling()))
{
item = temp;
}
return item;
}
void ViewMail::setBody(const RecBodyP&body )
{
m_body = body;
- m_mail[2] = QString::fromUtf8( body->Bodytext().latin1() );
+ m_mail[2] = body->Bodytext();
// qDebug("********text %s ",m_mail[2].latin1() );
attachbutton->setEnabled(body->Parts().count()>0);
attachments->setEnabled(body->Parts().count()>0);
if (body->Parts().count()==0)
{
return;
}
AttachItem * curItem=0;
AttachItem * parentItem = 0;
QString type=body->Description()->Type()+"/"+body->Description()->Subtype();
QString desc,fsize;
double s = body->Description()->Size();
int w;
w=0;
while (s>1024)
@@ -288,36 +288,36 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
if ( m_recMail->Wrapper() != 0l )
{ // make sure that there is a wrapper , even after delete or simular actions
browser->setText( m_recMail->Wrapper()->fetchTextPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) );
}
}
break;
}
delete menu;
}
void ViewMail::setMail(const RecMailP&mail )
{
m_recMail = mail;
- 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_mail[0] = mail->getFrom();
+ m_mail[1] = mail->getSubject();
+ m_mail[3] = mail->getDate();
+ m_mail[4] = mail->Msgid();
m_mail2[0] = mail->To();
m_mail2[1] = mail->CC();
m_mail2[2] = mail->Bcc();
setText();
}
ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
: ViewMailBase(parent, name, fl), _inLoop(false)
{
m_gotBody = false;
deleted = false;
@@ -337,35 +337,35 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
void ViewMail::readConfig()
{
setFont ( KOPrefs::instance()->mReadFont );
m_showHtml = KOPrefs::instance()->mViewAsHtml;
showHtml->setOn( m_showHtml );
}
void ViewMail::setText()
{
QString toString;
QString ccString;
QString bccString;
- toString = QString::fromUtf8(m_mail2[0].join(",").latin1());
- ccString = QString::fromUtf8(m_mail2[1].join(",").latin1());
- bccString = QString::fromUtf8(m_mail2[2].join(",").latin1());
+ toString = m_mail2[0].join(",");
+ ccString = m_mail2[1].join(",");
+ bccString = m_mail2[2].join(",");
setCaption( i18n("E-Mail by %1").arg( m_mail[0] ) );
m_mailHtml = "<html><body>"
"<table width=\"100%\" border=\"0\"><tr bgcolor=\"#FFDD76\"><td>"
"<div align=left><b>" + deHtml( m_mail[1] ) + "</b></div>"
"</td></tr><tr bgcolor=\"#EEEEE6\"><td>"
"<b>" + i18n( "From" ) + ": </b><font color=#6C86C0>" + deHtml( m_mail[0] ) + "</font><br>"
"<b>" + i18n( "To" ) + ": </b><font color=#6C86C0>" + deHtml( toString ) + "</font><br><b>" +
i18n( "Cc" ) + ": </b>" + deHtml( ccString ) + "<br>"
"<b>" + i18n( "Date" ) + ": </b> " + m_mail[3] +
"</td></tr></table><font>";
if ( !m_showHtml )
{
@@ -437,35 +437,35 @@ void ViewMail::slotReply()
QString text = m_mail[2];
QStringList lines = QStringList::split(QRegExp("\\n"), text);
QStringList::Iterator it;
for (it = lines.begin(); it != lines.end(); it++)
{
rtext += "> " + *it + "\n";
}
rtext += "\n";
QString prefix;
if ( m_mail[1].find(QRegExp("^Re: .*$")) != -1) prefix = "";
else prefix = "Re: "; // no i18n on purpose
Settings *settings = new Settings();
ComposeMail composer( settings ,this, 0, true);
if (m_recMail->Replyto().isEmpty()) {
- composer.setTo( QString::fromUtf8( m_recMail->getFrom().latin1()));
+ composer.setTo(m_recMail->getFrom());
} else {
- composer.setTo( QString::fromUtf8( m_recMail->Replyto().latin1()));
+ composer.setTo(m_recMail->Replyto());
}
composer.setSubject( prefix + m_mail[1] );
composer.setMessage( rtext );
composer.setInReplyTo(m_recMail->Msgid());
if ( QDialog::Accepted == KApplication::execDialog( &composer ) )
{
m_recMail->Wrapper()->answeredMail(m_recMail);
}
delete settings;
}
void ViewMail::slotForward()
{
if (!m_gotBody)
{