Diffstat (limited to 'noncore/unsupported/mailit/popclient.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/popclient.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/noncore/unsupported/mailit/popclient.cpp b/noncore/unsupported/mailit/popclient.cpp index dc0116d..5da3bcb 100644 --- a/noncore/unsupported/mailit/popclient.cpp +++ b/noncore/unsupported/mailit/popclient.cpp | |||
@@ -64,5 +64,5 @@ void PopClient::newConnection(const QString &target, int port) | |||
64 | //selected = FALSE; | 64 | //selected = FALSE; |
65 | 65 | ||
66 | emit updateStatus("DNS lookup"); | 66 | emit updateStatus(tr("DNS lookup")); |
67 | } | 67 | } |
68 | 68 | ||
@@ -104,6 +104,10 @@ void PopClient::connectionEstablished() | |||
104 | void PopClient::errorHandling(int status) | 104 | void PopClient::errorHandling(int status) |
105 | { | 105 | { |
106 | errorHandlingWithMsg( status, QString::null ); | ||
107 | } | ||
108 | void PopClient::errorHandlingWithMsg(int status, const QString & Msg ) | ||
109 | { | ||
106 | emit updateStatus(tr("Error Occured")); | 110 | emit updateStatus(tr("Error Occured")); |
107 | emit errorOccurred(status); | 111 | emit errorOccurred(status, Msg); |
108 | socket->close(); | 112 | socket->close(); |
109 | receiving = FALSE; | 113 | receiving = FALSE; |
@@ -168,5 +172,5 @@ void PopClient::incomingData() | |||
168 | *stream << "STAT" << "\r\n"; | 172 | *stream << "STAT" << "\r\n"; |
169 | status = Mcnt; | 173 | status = Mcnt; |
170 | } else errorHandling(ErrLoginFailed); | 174 | } else errorHandlingWithMsg(ErrLoginFailed, response); |
171 | break; | 175 | break; |
172 | } | 176 | } |
@@ -196,5 +200,5 @@ void PopClient::incomingData() | |||
196 | } | 200 | } |
197 | 201 | ||
198 | } else errorHandling(ErrUnknownResponse); | 202 | } else errorHandlingWithMsg(ErrUnknownResponse, response); |
199 | } | 203 | } |
200 | //Read message number x, count upwards to messageCount | 204 | //Read message number x, count upwards to messageCount |
@@ -235,5 +239,5 @@ void PopClient::incomingData() | |||
235 | } else { | 239 | } else { |
236 | //qWarning(response); | 240 | //qWarning(response); |
237 | errorHandling(ErrUnknownResponse); | 241 | errorHandlingWithMsg(ErrUnknownResponse, response); |
238 | } | 242 | } |
239 | } | 243 | } |
@@ -260,5 +264,5 @@ void PopClient::incomingData() | |||
260 | break; | 264 | break; |
261 | response = socket->readLine(); | 265 | response = socket->readLine(); |
262 | } else errorHandling(ErrUnknownResponse); | 266 | } else errorHandlingWithMsg(ErrUnknownResponse, response); |
263 | } | 267 | } |
264 | } | 268 | } |