summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/nntpwrapper.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper/nntpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/nntpwrapper.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/kmicromail/libmailwrapper/nntpwrapper.cpp b/kmicromail/libmailwrapper/nntpwrapper.cpp
index f5d7f16..93cd2b5 100644
--- a/kmicromail/libmailwrapper/nntpwrapper.cpp
+++ b/kmicromail/libmailwrapper/nntpwrapper.cpp
@@ -119,3 +119,3 @@ void NNTPwrapper::login()
- const char *server, *user, *pass;
+ QString server;
QString User,Pass;
@@ -124,7 +124,5 @@ void NNTPwrapper::login()
- server = account->getServer().latin1();
+ server = account->getServer();
port = account->getPort().toUInt();
- user = pass = 0;
-
if ( ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) && account->getLogin() ) {
@@ -134,4 +132,4 @@ void NNTPwrapper::login()
// ok
- User = login.getUser().latin1();
- Pass = login.getPassword().latin1();
+ User = login.getUser();
+ Pass = login.getPassword();
} else {
@@ -142,13 +140,6 @@ void NNTPwrapper::login()
} else {
- User = account->getUser().latin1();
- Pass = account->getPassword().latin1();
+ User = account->getUser();
+ Pass = account->getPassword();
}
- if (User.isEmpty()) {
- user=0;
- pass = 0;
- } else {
- user=User.latin1();
- pass=Pass.latin1();
- }
// bool ssl = account->getSSL();
@@ -169,4 +160,4 @@ void NNTPwrapper::login()
- nntp_mailstorage_init(m_nntp,(char*)server, port, NULL, CONNECTION_TYPE_PLAIN, NNTP_AUTH_TYPE_PLAIN,
- (char*)user,(char*)pass,0,0,0);
+ nntp_mailstorage_init(m_nntp,(char*)server.latin1(), port, NULL, CONNECTION_TYPE_PLAIN, NNTP_AUTH_TYPE_PLAIN,
+ (char*)User.latin1(),(char*)Pass.latin1(),0,0,0);