Diffstat (limited to 'noncore/net/mail/viewmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/viewmail.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index aa8f37a..78652d7 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp | |||
@@ -130,12 +130,13 @@ void ViewMail::setBody( RecBody body ) | |||
130 | 130 | ||
131 | curItem=new AttachItem(attachments,curItem,type,"Mailbody","",fsize,-1,body.Description().Positionlist()); | 131 | curItem=new AttachItem(attachments,curItem,type,"Mailbody","",fsize,-1,body.Description().Positionlist()); |
132 | QString filename = ""; | 132 | QString filename = ""; |
133 | 133 | ||
134 | for (unsigned int i = 0; i < body.Parts().count();++i) | 134 | for (unsigned int i = 0; i < body.Parts().count();++i) |
135 | { | 135 | { |
136 | filename = ""; | ||
136 | type = body.Parts()[i].Type()+"/"+body.Parts()[i].Subtype(); | 137 | type = body.Parts()[i].Type()+"/"+body.Parts()[i].Subtype(); |
137 | part_plist_t::ConstIterator it = body.Parts()[i].Parameters().begin(); | 138 | part_plist_t::ConstIterator it = body.Parts()[i].Parameters().begin(); |
138 | for (;it!=body.Parts()[i].Parameters().end();++it) | 139 | for (;it!=body.Parts()[i].Parameters().end();++it) |
139 | { | 140 | { |
140 | qDebug(it.key()); | 141 | qDebug(it.key()); |
141 | if (it.key().lower()=="name") | 142 | if (it.key().lower()=="name") |
@@ -392,13 +393,13 @@ void ViewMail::slotReply() | |||
392 | { | 393 | { |
393 | QMessageBox::information(this, tr("Error"), tr("<p>The mail body is not yet downloaded, so you cannot reply yet."), tr("Ok")); | 394 | QMessageBox::information(this, tr("Error"), tr("<p>The mail body is not yet downloaded, so you cannot reply yet."), tr("Ok")); |
394 | return; | 395 | return; |
395 | } | 396 | } |
396 | 397 | ||
397 | QString rtext; | 398 | QString rtext; |
398 | rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose | 399 | rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose |
399 | .arg( m_mail[0] ) | 400 | .arg( m_mail[0] ) |
400 | .arg( m_mail[3] ); | 401 | .arg( m_mail[3] ); |
401 | 402 | ||
402 | QString text = m_mail[2]; | 403 | QString text = m_mail[2]; |
403 | QStringList lines = QStringList::split(QRegExp("\\n"), text); | 404 | QStringList lines = QStringList::split(QRegExp("\\n"), text); |
404 | QStringList::Iterator it; | 405 | QStringList::Iterator it; |
@@ -407,25 +408,25 @@ void ViewMail::slotReply() | |||
407 | rtext += "> " + *it + "\n"; | 408 | rtext += "> " + *it + "\n"; |
408 | } | 409 | } |
409 | rtext += "\n"; | 410 | rtext += "\n"; |
410 | 411 | ||
411 | QString prefix; | 412 | QString prefix; |
412 | if ( m_mail[1].find(QRegExp("^Re: .*$")) != -1) prefix = ""; | 413 | if ( m_mail[1].find(QRegExp("^Re: .*$")) != -1) prefix = ""; |
413 | else prefix = "Re: "; // no i18n on purpose | 414 | else prefix = "Re: "; // no i18n on purpose |
414 | 415 | ||
415 | Settings *settings = new Settings(); | 416 | Settings *settings = new Settings(); |
416 | ComposeMail composer( settings ,this, 0, true); | 417 | ComposeMail composer( settings ,this, 0, true); |
417 | if (m_recMail.Replyto().isEmpty()) { | 418 | if (m_recMail.Replyto().isEmpty()) { |
418 | composer.setTo( m_recMail.getFrom()); | 419 | composer.setTo( m_recMail.getFrom()); |
419 | } else { | 420 | } else { |
420 | composer.setTo( m_recMail.Replyto()); | 421 | composer.setTo( m_recMail.Replyto()); |
421 | } | 422 | } |
422 | composer.setSubject( prefix + m_mail[1] ); | 423 | composer.setSubject( prefix + m_mail[1] ); |
423 | composer.setMessage( rtext ); | 424 | composer.setMessage( rtext ); |
424 | composer.setInReplyTo(m_recMail.Msgid()); | 425 | composer.setInReplyTo(m_recMail.Msgid()); |
425 | 426 | ||
426 | if ( QDialog::Accepted == QPEApplication::execDialog( &composer ) ) | 427 | if ( QDialog::Accepted == QPEApplication::execDialog( &composer ) ) |
427 | { | 428 | { |
428 | m_recMail.Wrapper()->answeredMail(m_recMail); | 429 | m_recMail.Wrapper()->answeredMail(m_recMail); |
429 | } | 430 | } |
430 | } | 431 | } |
431 | 432 | ||