summaryrefslogtreecommitdiff
path: root/noncore
authoralwin <alwin>2004-03-12 11:22:54 (UTC)
committer alwin <alwin>2004-03-12 11:22:54 (UTC)
commit6e37f7d804b100579c11fc77fcc99326ad98a9c7 (patch) (unidiff)
treecb92522221a566df3b030ae25f0550a92803f46c /noncore
parenta1ddbd219fcee196172f3fd684afac467e5f2469 (diff)
downloadopie-6e37f7d804b100579c11fc77fcc99326ad98a9c7.zip
opie-6e37f7d804b100579c11fc77fcc99326ad98a9c7.tar.gz
opie-6e37f7d804b100579c11fc77fcc99326ad98a9c7.tar.bz2
start usage of smart-pointer
Diffstat (limited to 'noncore') (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()
190#endif 190#endif
191 Mail mail; 191 Opie::osmart_pointer<Mail> mail=new Mail;
192 192
193 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); 193 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() );
194 mail.setMail(fromBox->currentText()); 194 mail->setMail(fromBox->currentText());
195 195
196 if ( !toLine->text().isEmpty() ) { 196 if ( !toLine->text().isEmpty() ) {
197 mail.setTo( toLine->text() ); 197 mail->setTo( toLine->text() );
198 } else { 198 } else {
@@ -202,7 +202,7 @@ void ComposeMail::accept()
202 } 202 }
203 mail.setName(senderNameEdit->text()); 203 mail->setName(senderNameEdit->text());
204 mail.setCC( ccLine->text() ); 204 mail->setCC( ccLine->text() );
205 mail.setBCC( bccLine->text() ); 205 mail->setBCC( bccLine->text() );
206 mail.setReply( replyLine->text() ); 206 mail->setReply( replyLine->text() );
207 mail.setSubject( subjectLine->text() ); 207 mail->setSubject( subjectLine->text() );
208 if (!m_replyid.isEmpty()) { 208 if (!m_replyid.isEmpty()) {
@@ -210,3 +210,3 @@ void ComposeMail::accept()
210 ids.append(m_replyid); 210 ids.append(m_replyid);
211 mail.setInreply(ids); 211 mail->setInreply(ids);
212 } 212 }
@@ -217,7 +217,6 @@ void ComposeMail::accept()
217 } 217 }
218 qDebug(txt); 218 mail->setMessage( txt );
219 mail.setMessage( txt );
220 AttachViewItem *it = (AttachViewItem *) attList->firstChild(); 219 AttachViewItem *it = (AttachViewItem *) attList->firstChild();
221 while ( it != NULL ) { 220 while ( it != NULL ) {
222 mail.addAttachment( it->getAttachment() ); 221 mail->addAttachment( it->getAttachment() );
223 it = (AttachViewItem *) it->nextSibling(); 222 it = (AttachViewItem *) it->nextSibling();
@@ -239,10 +238,10 @@ void ComposeMail::reject()
239 if (yesno == 0) { 238 if (yesno == 0) {
240 Mail mail; 239 Opie::osmart_pointer<Mail> mail=new Mail();
241 mail.setMail(fromBox->currentText()); 240 mail->setMail(fromBox->currentText());
242 mail.setTo( toLine->text() ); 241 mail->setTo( toLine->text() );
243 mail.setName(senderNameEdit->text()); 242 mail->setName(senderNameEdit->text());
244 mail.setCC( ccLine->text() ); 243 mail->setCC( ccLine->text() );
245 mail.setBCC( bccLine->text() ); 244 mail->setBCC( bccLine->text() );
246 mail.setReply( replyLine->text() ); 245 mail->setReply( replyLine->text() );
247 mail.setSubject( subjectLine->text() ); 246 mail->setSubject( subjectLine->text() );
248 if (!m_replyid.isEmpty()) { 247 if (!m_replyid.isEmpty()) {
@@ -250,3 +249,3 @@ void ComposeMail::reject()
250 ids.append(m_replyid); 249 ids.append(m_replyid);
251 mail.setInreply(ids); 250 mail->setInreply(ids);
252 } 251 }
@@ -258,3 +257,3 @@ void ComposeMail::reject()
258 qDebug(txt); 257 qDebug(txt);
259 mail.setMessage( txt ); 258 mail->setMessage( txt );
260 259