summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/sendmailprogress.cpp4
-rw-r--r--noncore/net/mail/libmailwrapper/sendmailprogressui.ui4
-rw-r--r--noncore/net/mail/libmailwrapper/smtpwrapper.cpp15
-rw-r--r--noncore/net/mail/sendmailprogress.cpp4
-rw-r--r--noncore/net/mail/sendmailprogressui.ui4
-rw-r--r--noncore/net/mail/smtpwrapper.cpp15
6 files changed, 32 insertions, 14 deletions
diff --git a/noncore/net/mail/libmailwrapper/sendmailprogress.cpp b/noncore/net/mail/libmailwrapper/sendmailprogress.cpp
index 13ddd37..ef22750 100644
--- a/noncore/net/mail/libmailwrapper/sendmailprogress.cpp
+++ b/noncore/net/mail/libmailwrapper/sendmailprogress.cpp
@@ -6,3 +6,3 @@
progressMailSend::progressMailSend(QWidget*parent, const char * name)
- :progressMailSendUI(parent,name,false),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0)
+ :progressMailSendUI(parent,name,true),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0)
{
@@ -45,3 +45,3 @@ void progressMailSend::setMails()
{
- QString text = QString(tr("Sending mail %1 of %2")).arg(m_current_single+1).arg(m_max_single);
+ QString text = QString(tr("Sending mail %1 of %2")).arg(m_current_mail+1).arg(m_max_mail);
allMailLabel->setText(text);
diff --git a/noncore/net/mail/libmailwrapper/sendmailprogressui.ui b/noncore/net/mail/libmailwrapper/sendmailprogressui.ui
index b90b088..287ab5e 100644
--- a/noncore/net/mail/libmailwrapper/sendmailprogressui.ui
+++ b/noncore/net/mail/libmailwrapper/sendmailprogressui.ui
@@ -13,4 +13,4 @@
<y>0</y>
- <width>316</width>
- <height>266</height>
+ <width>221</width>
+ <height>127</height>
</rect>
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
index 53c0af5..770e2b8 100644
--- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
@@ -527,3 +527,3 @@ void SMTPwrapper::progress( size_t current, size_t maximum )
SMTPwrapper::sendProgress->setSingleMail(current, maximum );
- qDebug("%u of %u",current,maximum);
+ qApp->processEvents();
}
@@ -654,5 +654,5 @@ void SMTPwrapper::sendMail(const Mail&mail,bool later )
sendProgress = new progressMailSend();
- sendProgress->showMaximized();
+// sendProgress->showMaximized();
sendProgress->show();
- qApp->processEvents(10);
+ sendProgress->setMaxMails(1);
smtpSend( mimeMail,later,smtp);
@@ -715,2 +715,7 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp)
mailsToSend.setAutoDelete(false);
+ sendProgress = new progressMailSend();
+// sendProgress->showMaximized();
+ sendProgress->show();
+ sendProgress->setMaxMails(mailsToSend.count());
+
while (mailsToSend.count()>0) {
@@ -723,3 +728,7 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp)
mailsToSend.removeFirst();
+ sendProgress->setCurrentMails(mailsToRemove.count());
}
+ sendProgress->hide();
+ delete sendProgress;
+ sendProgress = 0;
wrap->deleteMails(mbox,mailsToRemove);
diff --git a/noncore/net/mail/sendmailprogress.cpp b/noncore/net/mail/sendmailprogress.cpp
index 13ddd37..ef22750 100644
--- a/noncore/net/mail/sendmailprogress.cpp
+++ b/noncore/net/mail/sendmailprogress.cpp
@@ -6,3 +6,3 @@
progressMailSend::progressMailSend(QWidget*parent, const char * name)
- :progressMailSendUI(parent,name,false),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0)
+ :progressMailSendUI(parent,name,true),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0)
{
@@ -45,3 +45,3 @@ void progressMailSend::setMails()
{
- QString text = QString(tr("Sending mail %1 of %2")).arg(m_current_single+1).arg(m_max_single);
+ QString text = QString(tr("Sending mail %1 of %2")).arg(m_current_mail+1).arg(m_max_mail);
allMailLabel->setText(text);
diff --git a/noncore/net/mail/sendmailprogressui.ui b/noncore/net/mail/sendmailprogressui.ui
index b90b088..287ab5e 100644
--- a/noncore/net/mail/sendmailprogressui.ui
+++ b/noncore/net/mail/sendmailprogressui.ui
@@ -13,4 +13,4 @@
<y>0</y>
- <width>316</width>
- <height>266</height>
+ <width>221</width>
+ <height>127</height>
</rect>
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
@@ -527,3 +527,3 @@ void SMTPwrapper::progress( size_t current, size_t maximum )
SMTPwrapper::sendProgress->setSingleMail(current, maximum );
- qDebug("%u of %u",current,maximum);
+ qApp->processEvents();
}
@@ -654,5 +654,5 @@ void SMTPwrapper::sendMail(const Mail&mail,bool later )
sendProgress = new progressMailSend();
- sendProgress->showMaximized();
+// sendProgress->showMaximized();
sendProgress->show();
- qApp->processEvents(10);
+ sendProgress->setMaxMails(1);
smtpSend( mimeMail,later,smtp);
@@ -715,2 +715,7 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp)
mailsToSend.setAutoDelete(false);
+ sendProgress = new progressMailSend();
+// sendProgress->showMaximized();
+ sendProgress->show();
+ sendProgress->setMaxMails(mailsToSend.count());
+
while (mailsToSend.count()>0) {
@@ -723,3 +728,7 @@ void SMTPwrapper::flushOutbox(SMTPaccount*smtp)
mailsToSend.removeFirst();
+ sendProgress->setCurrentMails(mailsToRemove.count());
}
+ sendProgress->hide();
+ delete sendProgress;
+ sendProgress = 0;
wrap->deleteMails(mbox,mailsToRemove);