summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/popclient.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/mailit/popclient.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mailit/popclient.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/noncore/unsupported/mailit/popclient.cpp b/noncore/unsupported/mailit/popclient.cpp
index fedc4e2..dc0116d 100644
--- a/noncore/unsupported/mailit/popclient.cpp
+++ b/noncore/unsupported/mailit/popclient.cpp
@@ -51,5 +51,5 @@ PopClient::~PopClient()
}
-void PopClient::newConnection(QString target, int port)
+void PopClient::newConnection(const QString &target, int port)
{
if (receiving) {
@@ -67,5 +67,5 @@ void PopClient::newConnection(QString target, int port)
}
-void PopClient::setAccount(QString popUser, QString popPasswd)
+void PopClient::setAccount(const QString &popUser, const QString &popPasswd)
{
popUserName = popUser;
@@ -159,6 +159,6 @@ void PopClient::incomingData()
case Pass: {
*stream << "PASS " << popPassword << "\r\n";
- status = Stat;
-
+ status = Stat;
+
break;
}
@@ -167,5 +167,5 @@ void PopClient::incomingData()
if (response[0] == '+') {
*stream << "STAT" << "\r\n";
- status = Mcnt;
+ status = Mcnt;
} else errorHandling(ErrLoginFailed);
break;
@@ -183,10 +183,10 @@ void PopClient::incomingData()
if (synchronize) {
//messages deleted from server, reload all
- if (newMessages < lastSync)
- lastSync = 0;
+ if (newMessages < lastSync)
+ lastSync = 0;
messageCount = 1;
}
- if (selected) {
+ if (selected) {
int *ptr = mailList->first();
if (ptr != 0) {
@@ -194,5 +194,5 @@ void PopClient::incomingData()
messageCount = *ptr;
} else newMessages = 0;
- }
+ }
} else errorHandling(ErrUnknownResponse);
@@ -243,8 +243,8 @@ void PopClient::incomingData()
if (status != Quit) {
if ((selected)||(mailSize <= headerLimit))
- {
+ {
*stream << "RETR " << messageCount << "\r\n";
} else { //only header
- *stream << "TOP " << messageCount << " 0\r\n";
+ *stream << "TOP " << messageCount << " 0\r\n";
}
messageCount++;
@@ -277,13 +277,13 @@ void PopClient::incomingData()
break;
} else { //message reach entire size
- if ( (selected)||(mailSize <= headerLimit)) //mail size limit is not used if late download is active
- {
- emit newMessage(message, messageCount-1, mailSize, TRUE);
+ if ( (selected)||(mailSize <= headerLimit)) //mail size limit is not used if late download is active
+ {
+ emit newMessage(message, messageCount-1, mailSize, TRUE);
} else { //incomplete mail downloaded
- emit newMessage(message, messageCount-1, mailSize, FALSE);
+ emit newMessage(message, messageCount-1, mailSize, FALSE);
}
-
+
if ((messageCount > newMessages)||(selected)) //last message ?
- {
+ {
status = Quit;
if (selected) { //grab next from queue
@@ -291,7 +291,7 @@ void PopClient::incomingData()
status = Quit;
}
- }
+ }
else
- {
+ {
*stream << "LIST " << messageCount << "\r\n";
status = Size;