summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index 09e52b8..4f0c849 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -38,25 +38,24 @@ int IMAPwrapper::selectMbox(const QString&mbox)
}
int err = mailimap_select( m_imap, (char*)mbox.latin1());
if ( err != MAILIMAP_NO_ERROR ) {
m_Lastmbox = "";
return err;
}
m_Lastmbox = mbox;
return err;
}
void IMAPwrapper::imap_progress( size_t current, size_t maximum )
{
- qApp->processEvents();
return;
//qDebug("imap progress %d of %d ",current,maximum );
//Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum));
//qApp->processEvents()
static unsigned int last = 0;
if ( last != current )
IMAPwrapper::progress();
last = current;
}
void IMAPwrapper::progress( QString m )
{
static QString mProgrMess;
@@ -149,43 +148,42 @@ void IMAPwrapper::login(bool tryTLS) // = true)
if ( QDialog::Accepted == login.exec() ) {
// ok
user = login.getUser();
pass = login.getPassword();
} else {
// cancel
return;
}
} else {
user = account->getUser();
pass = account->getPassword();
}
-
m_imap = mailimap_new( 20, &imap_progress );
/* connect */
bool ssl = false;
bool try_tls = false;
bool force_tls = false;
if ( account->ConnectionType() == 2 ) {
ssl = true;
}
if (account->ConnectionType()==1) {
force_tls = true;
}
if ( ssl ) {
- qDebug("using ssl ");
+ //qDebug("using ssl ");
err = mailimap_ssl_connect( m_imap, (char*)server.latin1(), port );
- qDebug("back ");
+ //qDebug("back ");
} else {
err = mailimap_socket_connect( m_imap, (char*)server.latin1(), port );
}
if ( err != MAILIMAP_NO_ERROR &&
err != MAILIMAP_NO_ERROR_AUTHENTICATED &&
err != MAILIMAP_NO_ERROR_NON_AUTHENTICATED ) {
QString failure = "";
if (err == MAILIMAP_ERROR_CONNECTION_REFUSED) {
failure="Connection refused";
} else {
failure="Unknown failure";