summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
authorzautrix <zautrix>2004-09-11 18:10:31 (UTC)
committer zautrix <zautrix>2004-09-11 18:10:31 (UTC)
commit53dda80aaab72d7efdbed8a206dc1fa64fed10ee (patch) (side-by-side diff)
tree23b5248145679628c0d346f7d42c53714634e1a3 /kmicromail/libmailwrapper
parent438403295657bdcab9ee9e526c6a08894e876f63 (diff)
downloadkdepimpi-53dda80aaab72d7efdbed8a206dc1fa64fed10ee.zip
kdepimpi-53dda80aaab72d7efdbed8a206dc1fa64fed10ee.tar.gz
kdepimpi-53dda80aaab72d7efdbed8a206dc1fa64fed10ee.tar.bz2
progress fixes
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/abstractmail.cpp11
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp5
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.cpp12
3 files changed, 22 insertions, 6 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp
index 44878e0..8f67566 100644
--- a/kmicromail/libmailwrapper/abstractmail.cpp
+++ b/kmicromail/libmailwrapper/abstractmail.cpp
@@ -148,10 +148,12 @@ void AbstractMail::deleteMailList(const QValueList<RecMailP>&target)
// this is currently re-implemented in pop3wrapper and imapwrapper
int iii = 0;
int count = target.count();
- QWidget wid;
+ QProgressBar wid ( count );
+ wid.setCaption( tr("Deleting ..."));
wid.show();
while (iii < count ) {
Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
+ wid.setProgress( iii );
wid.raise();
qApp->processEvents();
RecMailP mail = (*target.at( iii ));
@@ -237,11 +239,14 @@ void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t,
if ( count == 0 )
return;
// wel, processevents is qite strange, we need a widget for getting
- // Global::statusMessage(tr("Copy2 message %1").arg(iii)); displayed
- QWidget wid;
+ // Global::statusMessage(tr("Copy2 message %1").arg(iii)); displaye
+
+ QProgressBar wid ( count );
+ wid.setCaption( tr("Copying ..."));
wid.show();
while (iii < count ) {
Global::statusMessage(tr("Copy message %1 of %2").arg(iii).arg(count));
+ wid.setProgress( iii );
wid.raise();
qApp->processEvents();
RecMailP r = (*t.at( iii ));
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index 91332c3..d79df4f 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -944,10 +944,13 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target)
mMax = count;
//progress( tr("Delete"));
- QWidget wid;
+
+ QProgressBar wid ( count );
+ wid.setCaption( tr("Deleting ..."));
wid.show();
while (iii < count ) {
Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
+ wid.setProgress( iii );
wid.raise();
qApp->processEvents();
RecMailP mail = (*target.at( iii ));
diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp
index 1edec9e..9d52f52 100644
--- a/kmicromail/libmailwrapper/pop3wrapper.cpp
+++ b/kmicromail/libmailwrapper/pop3wrapper.cpp
@@ -200,10 +200,13 @@ void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target)
return;
int iii = 0;
int count = target.count();
- QWidget wid;
+
+ QProgressBar wid ( count );
+ wid.setCaption( tr("Deleting ..."));
wid.show();
while (iii < count ) {
Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
+ wid.setProgress( iii );
wid.raise();
qApp->processEvents();
//qDebug("delete ");
@@ -239,10 +242,15 @@ int POP3wrapper::deleteAllMail(const FolderP&) {
Global::statusMessage(tr("Error getting folder info"));
return 0;
}
- QWidget wid;
+
+
+
+ QProgressBar wid ( result );
+ wid.setCaption( tr("Deleting ..."));
wid.show();
for (unsigned int i = 0; i < result; ++i) {
Global::statusMessage(tr("Delete message %1 of %2").arg(i).arg(result));
+ wid.setProgress( i );
wid.raise();
qApp->processEvents();