summaryrefslogtreecommitdiffabout
path: root/kmicromail/composemail.cpp
authorzautrix <zautrix>2004-07-06 16:42:29 (UTC)
committer zautrix <zautrix>2004-07-06 16:42:29 (UTC)
commit12695014a6bbf791f084d479a33883eeeb6d4e3b (patch) (side-by-side diff)
tree7877a59b574584303f930a91c8f265aa27e84e0a /kmicromail/composemail.cpp
parent45e2744074e876a74919b340efc320bdadadcb25 (diff)
downloadkdepimpi-12695014a6bbf791f084d479a33883eeeb6d4e3b.zip
kdepimpi-12695014a6bbf791f084d479a33883eeeb6d4e3b.tar.gz
kdepimpi-12695014a6bbf791f084d479a33883eeeb6d4e3b.tar.bz2
Fixed a crash
Diffstat (limited to 'kmicromail/composemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp28
1 files changed, 20 insertions, 8 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index c1b58a4..9060364 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -75,2 +75,10 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
}
+ if ( smtpAccounts.count() > 0 ) {
+ fillValues( smtpAccountBox->currentItem() );
+ } else {
+ QMessageBox::information( 0, tr( "Problem" ),
+ tr( "Please create an SMTP account first.\nThe SMTP is needed for sending mail.\n" ),
+ tr( "Ok" ) );
+ return;
+ }
connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) );
@@ -85,10 +93,3 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
warnAttach = true;
- if ( smtpAccounts.count() > 0 ) {
- fillValues( smtpAccountBox->currentItem() );
- } else {
- QMessageBox::information( 0, tr( "Problem" ),
- tr( "Please create an SMTP account first.\nThe SMTP is needed for sending mail.\n" ),
- tr( "Ok" ) );
- return;
- }
+
}
@@ -258,2 +259,8 @@ void ComposeMail::accept()
{
+ if ( smtpAccountBox->count() == 0 ) {
+
+ reject();
+ return;
+ }
+
if (! checkBoxLater->isChecked() ) {
@@ -329,2 +336,7 @@ void ComposeMail::reject()
if (yesno == 0) {
+ if ( toLine->text().isEmpty() ) {
+ QMessageBox::warning(0,tr("Sending mail"),
+ tr("No Receiver spezified" ) );
+ return;
+ }
saveAsDraft();