summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
authorharlekin <harlekin>2004-03-06 00:44:40 (UTC)
committer harlekin <harlekin>2004-03-06 00:44:40 (UTC)
commit4aea85aa2e205040da3ebdf50debde8b296e3c61 (patch) (unidiff)
tree424ee07b5886d70d45cc5d3b5c9ed6d32fd06d5f /noncore/net/mail/libmailwrapper/nntpwrapper.cpp
parent7b10be8e0ed88afe9e8964e6b5f1fe449cee3609 (diff)
downloadopie-4aea85aa2e205040da3ebdf50debde8b296e3c61.zip
opie-4aea85aa2e205040da3ebdf50debde8b296e3c61.tar.gz
opie-4aea85aa2e205040da3ebdf50debde8b296e3c61.tar.bz2
ups, works now .-)
Diffstat (limited to 'noncore/net/mail/libmailwrapper/nntpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/nntpwrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
index 2d6f9a3..ecdf848 100644
--- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
@@ -103,49 +103,49 @@ void NNTPwrapper::listMessages(const QString &, QList<RecMail> &target )
103 return; 103 return;
104 uint32_t res_messages,res_recent,res_unseen; 104 uint32_t res_messages,res_recent,res_unseen;
105 mailsession_status_folder(m_nntp->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); 105 mailsession_status_folder(m_nntp->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen);
106 parseList(target,m_nntp->sto_session,"INBOX"); 106 parseList(target,m_nntp->sto_session,"INBOX");
107} 107}
108 108
109void NNTPwrapper::login() 109void NNTPwrapper::login()
110{ 110{
111 if (account->getOffline()) 111 if (account->getOffline())
112 return; 112 return;
113 /* we'll hold the line */ 113 /* we'll hold the line */
114 if ( m_nntp != NULL ) 114 if ( m_nntp != NULL )
115 return; 115 return;
116 116
117 const char *server, *user, *pass; 117 const char *server, *user, *pass;
118 QString User,Pass; 118 QString User,Pass;
119 uint16_t port; 119 uint16_t port;
120 int err = NEWSNNTP_NO_ERROR; 120 int err = NEWSNNTP_NO_ERROR;
121 121
122 server = account->getServer().latin1(); 122 server = account->getServer().latin1();
123 port = account->getPort().toUInt(); 123 port = account->getPort().toUInt();
124 124
125 user = pass = 0; 125 user = pass = 0;
126 126
127 if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { 127 if ( ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) && account->getLogin() ) {
128 LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); 128 LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true );
129 login.show(); 129 login.show();
130 if ( QDialog::Accepted == login.exec() ) { 130 if ( QDialog::Accepted == login.exec() ) {
131 // ok 131 // ok
132 User = login.getUser().latin1(); 132 User = login.getUser().latin1();
133 Pass = login.getPassword().latin1(); 133 Pass = login.getPassword().latin1();
134 } else { 134 } else {
135 // cancel 135 // cancel
136 qDebug( "NNTP: Login canceled" ); 136 qDebug( "NNTP: Login canceled" );
137 return; 137 return;
138 } 138 }
139 } else { 139 } else {
140 User = account->getUser().latin1(); 140 User = account->getUser().latin1();
141 Pass = account->getPassword().latin1(); 141 Pass = account->getPassword().latin1();
142 } 142 }
143 143
144 if (User.isEmpty()) { 144 if (User.isEmpty()) {
145 user=0; 145 user=0;
146 pass = 0; 146 pass = 0;
147 } else { 147 } else {
148 user=User.latin1(); 148 user=User.latin1();
149 pass=Pass.latin1(); 149 pass=Pass.latin1();
150 } 150 }
151 // bool ssl = account->getSSL(); 151 // bool ssl = account->getSSL();