summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/pop3wrapper.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper/pop3wrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.cpp49
1 files changed, 12 insertions, 37 deletions
diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp
index f430121..8d2f778 100644
--- a/kmicromail/libmailwrapper/pop3wrapper.cpp
+++ b/kmicromail/libmailwrapper/pop3wrapper.cpp
@@ -127,9 +127,9 @@ void POP3wrapper::login()
if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) {
+ qApp->processEvents();
LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true );
login.show();
if ( QDialog::Accepted == login.exec() ) {
// ok
- qDebug("ok ");
user = login.getUser();
pass = login.getPassword();
@@ -166,5 +166,5 @@ void POP3wrapper::login()
if (err != MAIL_NO_ERROR) {
; // odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl;
- Global::statusMessage(tr("Error initializing folder"));
+ Global::statusMessage(tr("Error %1 initializing folder").arg( err ));
mailstorage_free(m_pop3);
m_pop3 = 0;
@@ -201,22 +201,9 @@ void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target)
int iii = 0;
int count = target.count();
- QProgressBar bar( count,0 );
- bar.setCaption (("Removing mails - close to abort!") );
- int w = 300;
- if ( QApplication::desktop()->width() < 320 )
- w = 220;
- int h = bar.sizeHint().height() ;
- int dw = QApplication::desktop()->width();
- int dh = QApplication::desktop()->height();
- bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
- bar.show();
- int modulo = (count/10)+1;
- int incCounter = 0;
+ QWidget wid;
+ wid.show();
while (iii < count ) {
- if ( ! bar.isVisible() )
- return ;
- if ( incCounter % modulo == 0 )
- bar.setProgress( incCounter );
- ++incCounter;
+ Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
+ wid.raise();
qApp->processEvents();
//qDebug("delete ");
@@ -253,23 +240,11 @@ int POP3wrapper::deleteAllMail(const FolderP&) {
return 0;
}
- QProgressBar bar( result,0 );
- bar.setCaption (("Deleting mails - close to abort!") );
- int w = 300;
- if ( QApplication::desktop()->width() < 320 )
- w = 220;
- int h = bar.sizeHint().height() ;
- int dw = QApplication::desktop()->width();
- int dh = QApplication::desktop()->height();
- bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
- bar.show();
- int modulo = (result/10)+1;
- int incCounter = 0;
- for (unsigned int i = 0; i < result; ++i) {
- if ( ! bar.isVisible() )
- return 0;
- if ( incCounter % modulo == 0 )
- bar.setProgress( incCounter );
- ++incCounter;
+ QWidget wid;
+ wid.show();
+ for (unsigned int i = 0; i < result; ++i) {
+ Global::statusMessage(tr("Delete message %1 of %2").arg(i).arg(result));
+ wid.raise();
qApp->processEvents();
+
err = mailsession_remove_message(m_pop3->sto_session,i+1);
if (err != MAIL_NO_ERROR) {