author | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
commit | 62d2ddfb5cd77e2637cdf7fe16d76aac04975984 (patch) (unidiff) | |
tree | 2157d57bab2d6e491226f5bc8468a4c2527e1456 /noncore/net/mailit/popclient.cpp | |
parent | 0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e (diff) | |
download | opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.zip opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.gz opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.bz2 |
QString to const QString
Diffstat (limited to 'noncore/net/mailit/popclient.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/popclient.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/noncore/net/mailit/popclient.cpp b/noncore/net/mailit/popclient.cpp index fedc4e2..dc0116d 100644 --- a/noncore/net/mailit/popclient.cpp +++ b/noncore/net/mailit/popclient.cpp | |||
@@ -50,7 +50,7 @@ PopClient::~PopClient() | |||
50 | delete stream; | 50 | delete stream; |
51 | } | 51 | } |
52 | 52 | ||
53 | void PopClient::newConnection(QString target, int port) | 53 | void PopClient::newConnection(const QString &target, int port) |
54 | { | 54 | { |
55 | if (receiving) { | 55 | if (receiving) { |
56 | qWarning("socket in use, connection refused"); | 56 | qWarning("socket in use, connection refused"); |
@@ -66,7 +66,7 @@ void PopClient::newConnection(QString target, int port) | |||
66 | emit updateStatus("DNS lookup"); | 66 | emit updateStatus("DNS lookup"); |
67 | } | 67 | } |
68 | 68 | ||
69 | void PopClient::setAccount(QString popUser, QString popPasswd) | 69 | void PopClient::setAccount(const QString &popUser, const QString &popPasswd) |
70 | { | 70 | { |
71 | popUserName = popUser; | 71 | popUserName = popUser; |
72 | popPassword = popPasswd; | 72 | popPassword = popPasswd; |
@@ -158,15 +158,15 @@ void PopClient::incomingData() | |||
158 | 158 | ||
159 | case Pass: { | 159 | case Pass: { |
160 | *stream << "PASS " << popPassword << "\r\n"; | 160 | *stream << "PASS " << popPassword << "\r\n"; |
161 | status = Stat; | 161 | status = Stat; |
162 | 162 | ||
163 | break; | 163 | break; |
164 | } | 164 | } |
165 | //ask for number of messages | 165 | //ask for number of messages |
166 | case Stat: { | 166 | case Stat: { |
167 | if (response[0] == '+') { | 167 | if (response[0] == '+') { |
168 | *stream << "STAT" << "\r\n"; | 168 | *stream << "STAT" << "\r\n"; |
169 | status = Mcnt; | 169 | status = Mcnt; |
170 | } else errorHandling(ErrLoginFailed); | 170 | } else errorHandling(ErrLoginFailed); |
171 | break; | 171 | break; |
172 | } | 172 | } |
@@ -182,18 +182,18 @@ void PopClient::incomingData() | |||
182 | 182 | ||
183 | if (synchronize) { | 183 | if (synchronize) { |
184 | //messages deleted from server, reload all | 184 | //messages deleted from server, reload all |
185 | if (newMessages < lastSync) | 185 | if (newMessages < lastSync) |
186 | lastSync = 0; | 186 | lastSync = 0; |
187 | messageCount = 1; | 187 | messageCount = 1; |
188 | } | 188 | } |
189 | 189 | ||
190 | if (selected) { | 190 | if (selected) { |
191 | int *ptr = mailList->first(); | 191 | int *ptr = mailList->first(); |
192 | if (ptr != 0) { | 192 | if (ptr != 0) { |
193 | newMessages++; //to ensure no early jumpout | 193 | newMessages++; //to ensure no early jumpout |
194 | messageCount = *ptr; | 194 | messageCount = *ptr; |
195 | } else newMessages = 0; | 195 | } else newMessages = 0; |
196 | } | 196 | } |
197 | 197 | ||
198 | } else errorHandling(ErrUnknownResponse); | 198 | } else errorHandling(ErrUnknownResponse); |
199 | } | 199 | } |
@@ -242,10 +242,10 @@ void PopClient::incomingData() | |||
242 | case Retr: { | 242 | case Retr: { |
243 | if (status != Quit) { | 243 | if (status != Quit) { |
244 | if ((selected)||(mailSize <= headerLimit)) | 244 | if ((selected)||(mailSize <= headerLimit)) |
245 | { | 245 | { |
246 | *stream << "RETR " << messageCount << "\r\n"; | 246 | *stream << "RETR " << messageCount << "\r\n"; |
247 | } else { //only header | 247 | } else { //only header |
248 | *stream << "TOP " << messageCount << " 0\r\n"; | 248 | *stream << "TOP " << messageCount << " 0\r\n"; |
249 | } | 249 | } |
250 | messageCount++; | 250 | messageCount++; |
251 | status = Ignore; | 251 | status = Ignore; |
@@ -276,23 +276,23 @@ void PopClient::incomingData() | |||
276 | if (x == -1) { | 276 | if (x == -1) { |
277 | break; | 277 | break; |
278 | } else { //message reach entire size | 278 | } else { //message reach entire size |
279 | if ( (selected)||(mailSize <= headerLimit)) //mail size limit is not used if late download is active | 279 | if ( (selected)||(mailSize <= headerLimit)) //mail size limit is not used if late download is active |
280 | { | 280 | { |
281 | emit newMessage(message, messageCount-1, mailSize, TRUE); | 281 | emit newMessage(message, messageCount-1, mailSize, TRUE); |
282 | } else { //incomplete mail downloaded | 282 | } else { //incomplete mail downloaded |
283 | emit newMessage(message, messageCount-1, mailSize, FALSE); | 283 | emit newMessage(message, messageCount-1, mailSize, FALSE); |
284 | } | 284 | } |
285 | 285 | ||
286 | if ((messageCount > newMessages)||(selected)) //last message ? | 286 | if ((messageCount > newMessages)||(selected)) //last message ? |
287 | { | 287 | { |
288 | status = Quit; | 288 | status = Quit; |
289 | if (selected) { //grab next from queue | 289 | if (selected) { //grab next from queue |
290 | newMessages--; | 290 | newMessages--; |
291 | status = Quit; | 291 | status = Quit; |
292 | } | 292 | } |
293 | } | 293 | } |
294 | else | 294 | else |
295 | { | 295 | { |
296 | *stream << "LIST " << messageCount << "\r\n"; | 296 | *stream << "LIST " << messageCount << "\r\n"; |
297 | status = Size; | 297 | status = Size; |
298 | temp2.setNum(newMessages - lastSync); | 298 | temp2.setNum(newMessages - lastSync); |