Diffstat (limited to 'noncore/net/mail/imapwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp index 838300a..cce3d34 100644 --- a/noncore/net/mail/imapwrapper.cpp +++ b/noncore/net/mail/imapwrapper.cpp | |||
@@ -5,2 +5,3 @@ | |||
5 | #include "mailtypes.h" | 5 | #include "mailtypes.h" |
6 | #include "logindialog.h" | ||
6 | #include <libetpan/mailimap.h> | 7 | #include <libetpan/mailimap.h> |
@@ -38,4 +39,18 @@ void IMAPwrapper::login() | |||
38 | port = account->getPort().toUInt(); | 39 | port = account->getPort().toUInt(); |
40 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { | ||
41 | LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); | ||
42 | login.show(); | ||
43 | if ( QDialog::Accepted == login.exec() ) { | ||
44 | // ok | ||
45 | user = strdup( login.getUser().latin1() ); | ||
46 | pass = strdup( login.getPassword().latin1() ); | ||
47 | } else { | ||
48 | // cancel | ||
49 | qDebug( "IMAP: Login canceled" ); | ||
50 | return; | ||
51 | } | ||
52 | } else { | ||
39 | user = account->getUser().latin1(); | 53 | user = account->getUser().latin1(); |
40 | pass = account->getPassword().latin1(); | 54 | pass = account->getPassword().latin1(); |
55 | } | ||
41 | 56 | ||