author | alwin <alwin> | 2003-12-24 02:00:34 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-24 02:00:34 (UTC) |
commit | fa581423c0ffcf35cbc403645e2131e84342dae4 (patch) (unidiff) | |
tree | 53152de4b2213f858096141bb50e5ca2ec0e91ef /noncore/net/mail/smtpwrapper.cpp | |
parent | 242f7a04e3e4963a5606ac603d54a4f115de4a04 (diff) | |
download | opie-fa581423c0ffcf35cbc403645e2131e84342dae4.zip opie-fa581423c0ffcf35cbc403645e2131e84342dae4.tar.gz opie-fa581423c0ffcf35cbc403645e2131e84342dae4.tar.bz2 |
ah, ok. I found the trick or better I found what I forgot :)
Means: When sending mail a progress dialog comes up.
Diffstat (limited to 'noncore/net/mail/smtpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/smtpwrapper.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/noncore/net/mail/smtpwrapper.cpp b/noncore/net/mail/smtpwrapper.cpp index 53c0af5..770e2b8 100644 --- a/noncore/net/mail/smtpwrapper.cpp +++ b/noncore/net/mail/smtpwrapper.cpp | |||
@@ -525,7 +525,7 @@ void SMTPwrapper::progress( size_t current, size_t maximum ) | |||
525 | { | 525 | { |
526 | if (SMTPwrapper::sendProgress) { | 526 | if (SMTPwrapper::sendProgress) { |
527 | SMTPwrapper::sendProgress->setSingleMail(current, maximum ); | 527 | SMTPwrapper::sendProgress->setSingleMail(current, maximum ); |
528 | qDebug("%u of %u",current,maximum); | 528 | qApp->processEvents(); |
529 | } | 529 | } |
530 | } | 530 | } |
531 | 531 | ||
@@ -652,9 +652,9 @@ void SMTPwrapper::sendMail(const Mail&mail,bool later ) | |||
652 | qDebug( "sendMail: error creating mime mail" ); | 652 | qDebug( "sendMail: error creating mime mail" ); |
653 | } else { | 653 | } else { |
654 | sendProgress = new progressMailSend(); | 654 | sendProgress = new progressMailSend(); |
655 | sendProgress->showMaximized(); | 655 | // sendProgress->showMaximized(); |
656 | sendProgress->show(); | 656 | sendProgress->show(); |
657 | qApp->processEvents(10); | 657 | sendProgress->setMaxMails(1); |
658 | smtpSend( mimeMail,later,smtp); | 658 | smtpSend( mimeMail,later,smtp); |
659 | mailmime_free( mimeMail ); | 659 | mailmime_free( mimeMail ); |
660 | qDebug("Clean up done"); | 660 | qDebug("Clean up done"); |
@@ -713,6 +713,11 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
713 | return; | 713 | return; |
714 | } | 714 | } |
715 | mailsToSend.setAutoDelete(false); | 715 | mailsToSend.setAutoDelete(false); |
716 | sendProgress = new progressMailSend(); | ||
717 | // sendProgress->showMaximized(); | ||
718 | sendProgress->show(); | ||
719 | sendProgress->setMaxMails(mailsToSend.count()); | ||
720 | |||
716 | while (mailsToSend.count()>0) { | 721 | while (mailsToSend.count()>0) { |
717 | if (sendQueuedMail(wrap,smtp,mailsToSend.at(0))==0) { | 722 | if (sendQueuedMail(wrap,smtp,mailsToSend.at(0))==0) { |
718 | QMessageBox::critical(0,tr("Error sending mail"), | 723 | QMessageBox::critical(0,tr("Error sending mail"), |
@@ -721,7 +726,11 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
721 | } | 726 | } |
722 | mailsToRemove.append(mailsToSend.at(0)); | 727 | mailsToRemove.append(mailsToSend.at(0)); |
723 | mailsToSend.removeFirst(); | 728 | mailsToSend.removeFirst(); |
729 | sendProgress->setCurrentMails(mailsToRemove.count()); | ||
724 | } | 730 | } |
731 | sendProgress->hide(); | ||
732 | delete sendProgress; | ||
733 | sendProgress = 0; | ||
725 | wrap->deleteMails(mbox,mailsToRemove); | 734 | wrap->deleteMails(mbox,mailsToRemove); |
726 | mailsToSend.setAutoDelete(true); | 735 | mailsToSend.setAutoDelete(true); |
727 | delete wrap; | 736 | delete wrap; |