summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
authorjgf <jgf>2003-12-18 16:02:47 (UTC)
committer jgf <jgf>2003-12-18 16:02:47 (UTC)
commit5b88f5d05b2f3f5d106b58b07bc7018f757cfc03 (patch) (unidiff)
tree27f8a7ccb9dd659ea8484cb12c0e3dc3c3c99252 /noncore/net/mail/libmailwrapper/pop3wrapper.cpp
parent5cb08b0c69ffc7216405b552e17ff0541578bda0 (diff)
downloadopie-5b88f5d05b2f3f5d106b58b07bc7018f757cfc03.zip
opie-5b88f5d05b2f3f5d106b58b07bc7018f757cfc03.tar.gz
opie-5b88f5d05b2f3f5d106b58b07bc7018f757cfc03.tar.bz2
ask for user/password if field is empty
Diffstat (limited to 'noncore/net/mail/libmailwrapper/pop3wrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/pop3wrapper.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
index 22a4c70..b0b985c 100644
--- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
@@ -3,2 +3,3 @@
3#include "mailtypes.h" 3#include "mailtypes.h"
4#include "logindialog.h"
4#include <libetpan/mailpop3.h> 5#include <libetpan/mailpop3.h>
@@ -359,4 +360,19 @@ void POP3wrapper::login()
359 port = account->getPort().toUInt(); 360 port = account->getPort().toUInt();
360 user = account->getUser().latin1(); 361
361 pass = account->getPassword().latin1(); 362 if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) {
363 LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true );
364 login.show();
365 if ( QDialog::Accepted == login.exec() ) {
366 // ok
367 user = strdup( login.getUser().latin1() );
368 pass = strdup( login.getPassword().latin1() );
369 } else {
370 // cancel
371 qDebug( "POP3: Login canceled" );
372 return;
373 }
374 } else {
375 user = account->getUser().latin1();
376 pass = account->getPassword().latin1();
377 }
362 378