author | alwin <alwin> | 2003-12-23 01:37:58 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-23 01:37:58 (UTC) |
commit | 04a7006c0392c02941e263d4d35edeeb2f98223d (patch) (unidiff) | |
tree | b146f699fec46c2a2208fd91097952b6303ba2f8 | |
parent | be95b109fdd37e86b179bf63b15a647acc58a445 (diff) | |
download | opie-04a7006c0392c02941e263d4d35edeeb2f98223d.zip opie-04a7006c0392c02941e263d4d35edeeb2f98223d.tar.gz opie-04a7006c0392c02941e263d4d35edeeb2f98223d.tar.bz2 |
fix a problem while appending attachments to a new mail
-rw-r--r-- | noncore/net/mail/composemail.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index f532815..73d1a43 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp | |||
@@ -171,45 +171,45 @@ void ComposeMail::accept() | |||
171 | 171 | ||
172 | mail->setMail( smtp->getMail() ); | 172 | mail->setMail( smtp->getMail() ); |
173 | mail->setName( smtp->getName() ); | 173 | mail->setName( smtp->getName() ); |
174 | 174 | ||
175 | if ( !toLine->text().isEmpty() ) { | 175 | if ( !toLine->text().isEmpty() ) { |
176 | mail->setTo( toLine->text() ); | 176 | mail->setTo( toLine->text() ); |
177 | } else { | 177 | } else { |
178 | qDebug( "No Reciever spezified -> returning" ); | 178 | qDebug( "No Reciever spezified -> returning" ); |
179 | return; | 179 | return; |
180 | } | 180 | } |
181 | 181 | ||
182 | mail->setCC( ccLine->text() ); | 182 | mail->setCC( ccLine->text() ); |
183 | mail->setBCC( bccLine->text() ); | 183 | mail->setBCC( bccLine->text() ); |
184 | mail->setReply( replyLine->text() ); | 184 | mail->setReply( replyLine->text() ); |
185 | mail->setSubject( subjectLine->text() ); | 185 | mail->setSubject( subjectLine->text() ); |
186 | QString txt = message->text(); | 186 | QString txt = message->text(); |
187 | if ( !sigMultiLine->text().isEmpty() ) { | 187 | if ( !sigMultiLine->text().isEmpty() ) { |
188 | txt.append( "\n--\n" ); | 188 | txt.append( "\n--\n" ); |
189 | txt.append( sigMultiLine->text() ); | 189 | txt.append( sigMultiLine->text() ); |
190 | } | 190 | } |
191 | mail->setMessage( txt ); | 191 | mail->setMessage( txt ); |
192 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); | 192 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); |
193 | while ( it != NULL ) { | 193 | while ( it != NULL ) { |
194 | mail->addAttachment( it->getAttachment() ); | 194 | mail->addAttachment( it->getAttachment() ); |
195 | it = (AttachViewItem *) it->itemBelow(); | 195 | it = (AttachViewItem *) it->nextSibling(); |
196 | } | 196 | } |
197 | 197 | ||
198 | SMTPwrapper wrapper( settings ); | 198 | SMTPwrapper wrapper( settings ); |
199 | wrapper.sendMail( *mail,checkBoxLater->isChecked() ); | 199 | wrapper.sendMail( *mail,checkBoxLater->isChecked() ); |
200 | 200 | ||
201 | QDialog::accept(); | 201 | QDialog::accept(); |
202 | } | 202 | } |
203 | 203 | ||
204 | AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) | 204 | AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) |
205 | : QListViewItem( parent ) | 205 | : QListViewItem( parent ) |
206 | { | 206 | { |
207 | attachment = att; | 207 | attachment = att; |
208 | qDebug( att->getMimeType() ); | 208 | qDebug( att->getMimeType() ); |
209 | setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? | 209 | setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? |
210 | Resource::loadPixmap( "UnknownDocument-14" ) : | 210 | Resource::loadPixmap( "UnknownDocument-14" ) : |
211 | attachment->getDocLnk().pixmap() ); | 211 | attachment->getDocLnk().pixmap() ); |
212 | setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); | 212 | setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); |
213 | setText( 1, QString::number( att->getSize() ) ); | 213 | setText( 1, QString::number( att->getSize() ) ); |
214 | } | 214 | } |
215 | 215 | ||