summaryrefslogtreecommitdiffabout
path: root/kmicromail/composemail.cpp
authorzautrix <zautrix>2004-07-03 19:26:15 (UTC)
committer zautrix <zautrix>2004-07-03 19:26:15 (UTC)
commitcc67ce39cdd7730caee878da3b191d76cad9479f (patch) (side-by-side diff)
treea19e8297fdf060845e1a81b58afe5272a58c3b61 /kmicromail/composemail.cpp
parent55413f404aa7a59bfbf38f9f91fabb595eca57ad (diff)
downloadkdepimpi-cc67ce39cdd7730caee878da3b191d76cad9479f.zip
kdepimpi-cc67ce39cdd7730caee878da3b191d76cad9479f.tar.gz
kdepimpi-cc67ce39cdd7730caee878da3b191d76cad9479f.tar.bz2
better error handling
Diffstat (limited to 'kmicromail/composemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 2c2e279..ca4f247 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -123,3 +123,3 @@ void ComposeMail::saveAsDraft()
/* attachments we will ignore! */
- if ( it != NULL ) {
+ if ( it != 0 ) {
if ( warnAttach )
@@ -138,3 +138,3 @@ void ComposeMail::setStatus( QString status )
topLevelWidget()->setCaption( status );
- QTimer::singleShot ( 5000, this, SLOT( clearStatus() ) ) ;
+ QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ;
}
@@ -302,3 +302,3 @@ void ComposeMail::accept()
AttachViewItem *it = (AttachViewItem *) attList->firstChild();
- while ( it != NULL ) {
+ while ( it != 0 ) {
mail->addAttachment( it->getAttachment() );
@@ -308,3 +308,9 @@ void ComposeMail::accept()
SMTPwrapper wrapper( smtp );
- wrapper.sendMail( mail,checkBoxLater->isChecked() );
+ if ( wrapper.sendMail( mail,checkBoxLater->isChecked() ) )
+ setStatus( tr ("Mail sent"));
+ else {
+ setStatus( tr ("Error: Something went wrong. Nothing sent"));
+ return;
+ }
+