summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/composemail.cpp43
1 files changed, 21 insertions, 22 deletions
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp
index b9c9cbc..445cc5e 100644
--- a/noncore/net/mail/composemail.cpp
+++ b/noncore/net/mail/composemail.cpp
@@ -189,11 +189,11 @@ void ComposeMail::accept()
smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() );
#endif
- Mail mail;
+ Opie::osmart_pointer<Mail> mail=new Mail;
SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() );
- mail.setMail(fromBox->currentText());
+ mail->setMail(fromBox->currentText());
if ( !toLine->text().isEmpty() ) {
- mail.setTo( toLine->text() );
+ mail->setTo( toLine->text() );
} else {
QMessageBox::warning(0,tr("Sending mail"),
@@ -201,13 +201,13 @@ void ComposeMail::accept()
return;
}
- mail.setName(senderNameEdit->text());
- mail.setCC( ccLine->text() );
- mail.setBCC( bccLine->text() );
- mail.setReply( replyLine->text() );
- mail.setSubject( subjectLine->text() );
+ mail->setName(senderNameEdit->text());
+ mail->setCC( ccLine->text() );
+ mail->setBCC( bccLine->text() );
+ mail->setReply( replyLine->text() );
+ mail->setSubject( subjectLine->text() );
if (!m_replyid.isEmpty()) {
QStringList ids;
ids.append(m_replyid);
- mail.setInreply(ids);
+ mail->setInreply(ids);
}
QString txt = message->text();
@@ -216,9 +216,8 @@ void ComposeMail::accept()
txt.append( sigMultiLine->text() );
}
- qDebug(txt);
- mail.setMessage( txt );
+ mail->setMessage( txt );
AttachViewItem *it = (AttachViewItem *) attList->firstChild();
while ( it != NULL ) {
- mail.addAttachment( it->getAttachment() );
+ mail->addAttachment( it->getAttachment() );
it = (AttachViewItem *) it->nextSibling();
}
@@ -238,16 +237,16 @@ void ComposeMail::reject()
if (yesno == 0) {
- Mail mail;
- mail.setMail(fromBox->currentText());
- mail.setTo( toLine->text() );
- mail.setName(senderNameEdit->text());
- mail.setCC( ccLine->text() );
- mail.setBCC( bccLine->text() );
- mail.setReply( replyLine->text() );
- mail.setSubject( subjectLine->text() );
+ Opie::osmart_pointer<Mail> mail=new Mail();
+ mail->setMail(fromBox->currentText());
+ mail->setTo( toLine->text() );
+ mail->setName(senderNameEdit->text());
+ mail->setCC( ccLine->text() );
+ mail->setBCC( bccLine->text() );
+ mail->setReply( replyLine->text() );
+ mail->setSubject( subjectLine->text() );
if (!m_replyid.isEmpty()) {
QStringList ids;
ids.append(m_replyid);
- mail.setInreply(ids);
+ mail->setInreply(ids);
}
QString txt = message->text();
@@ -257,5 +256,5 @@ void ComposeMail::reject()
}
qDebug(txt);
- mail.setMessage( txt );
+ mail->setMessage( txt );
/* only use the default drafts folder name! */