summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/libmail/imaphandler.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mail2/libmail/imaphandler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/libmail/imaphandler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/unsupported/mail2/libmail/imaphandler.cpp b/noncore/unsupported/mail2/libmail/imaphandler.cpp
index 7493240..dc97b28 100644
--- a/noncore/unsupported/mail2/libmail/imaphandler.cpp
+++ b/noncore/unsupported/mail2/libmail/imaphandler.cpp
@@ -289,29 +289,32 @@ QString IMAPHandler::tag(bool count)
289} 289}
290 290
291void IMAPHandler::slotDataReceived(const QString &data) 291void IMAPHandler::slotDataReceived(const QString &data)
292{ 292{
293 if (!_ready) { 293 if (!_ready) {
294 // The first data is always the greeting string. 294 // The first data is always the greeting string.
295 // We can ignore it. 295 // We can ignore it.
296 _ready = true; 296 _ready = true;
297 return; 297 return;
298 } 298 }
299 299
300 300
301 IMAPResponseParser parser(data); 301 IMAPResponseParser parser;
302 //connect ( &parser, SIGNAL( needMoreData ( QString & )), _ibase, SLOT( tryRead ( QString & )));
303 parser. parse ( data );
302 IMAPResponse response = parser.response(); 304 IMAPResponse response = parser.response();
305 //disconnect ( &parser, SIGNAL( needMoreData ( QString & )), _ibase, SLOT( tryRead ( QString & )));
303 response.setImapHandler(this); 306 response.setImapHandler(this);
304 307
305 if (!_loggingin) emit gotResponse(response); 308 if (!_loggingin) { qDebug("Emitting gotResponse!\n" ); emit gotResponse(response); }
306 else { 309 else {
307 if (response.statusResponse().status() == IMAPResponseEnums::OK) { 310 if (response.statusResponse().status() == IMAPResponseEnums::OK) {
308 _loggingin = false; 311 _loggingin = false;
309 _loggedin = true; 312 _loggedin = true;
310 qWarning("OK. Logged in. Leaving loggingin state."); 313 qWarning("OK. Logged in. Leaving loggingin state.");
311 } else { 314 } else {
312 _loggingin = false; 315 _loggingin = false;
313 emit IMAPError(IMAPBase::IMAPErrLoginFailed); 316 emit IMAPError(IMAPBase::IMAPErrLoginFailed);
314 } 317 }
315 } 318 }
316} 319}
317 320