summaryrefslogtreecommitdiff
authoralwin <alwin>2004-03-12 11:22:54 (UTC)
committer alwin <alwin>2004-03-12 11:22:54 (UTC)
commit6e37f7d804b100579c11fc77fcc99326ad98a9c7 (patch) (side-by-side diff)
treecb92522221a566df3b030ae25f0550a92803f46c
parenta1ddbd219fcee196172f3fd684afac467e5f2469 (diff)
downloadopie-6e37f7d804b100579c11fc77fcc99326ad98a9c7.zip
opie-6e37f7d804b100579c11fc77fcc99326ad98a9c7.tar.gz
opie-6e37f7d804b100579c11fc77fcc99326ad98a9c7.tar.bz2
start usage of smart-pointer
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
@@ -190,9 +190,9 @@ void ComposeMail::accept()
#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 {
@@ -202,7 +202,7 @@ void ComposeMail::accept()
}
- 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()) {
@@ -210,3 +210,3 @@ void ComposeMail::accept()
ids.append(m_replyid);
- mail.setInreply(ids);
+ mail->setInreply(ids);
}
@@ -217,7 +217,6 @@ void ComposeMail::accept()
}
- 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();
@@ -239,10 +238,10 @@ 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()) {
@@ -250,3 +249,3 @@ void ComposeMail::reject()
ids.append(m_replyid);
- mail.setInreply(ids);
+ mail->setInreply(ids);
}
@@ -258,3 +257,3 @@ void ComposeMail::reject()
qDebug(txt);
- mail.setMessage( txt );
+ mail->setMessage( txt );