diff options
Diffstat (limited to 'examples/imapresource/imapserverproxy.cpp')
-rw-r--r-- | examples/imapresource/imapserverproxy.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/imapresource/imapserverproxy.cpp b/examples/imapresource/imapserverproxy.cpp index dabdd8e..a856576 100644 --- a/examples/imapresource/imapserverproxy.cpp +++ b/examples/imapresource/imapserverproxy.cpp | |||
@@ -159,6 +159,16 @@ KAsync::Job<void> ImapServerProxy::login(const QString &username, const QString | |||
159 | // SinkTrace() << "Found personal namespaces: " << mNamespaces.personal; | 159 | // SinkTrace() << "Found personal namespaces: " << mNamespaces.personal; |
160 | // SinkTrace() << "Found shared namespaces: " << mNamespaces.shared; | 160 | // SinkTrace() << "Found shared namespaces: " << mNamespaces.shared; |
161 | // SinkTrace() << "Found user namespaces: " << mNamespaces.user; | 161 | // SinkTrace() << "Found user namespaces: " << mNamespaces.user; |
162 | }).then([=] (const KAsync::Error &error) { | ||
163 | if (error) { | ||
164 | if (error.errorCode == KIMAP2::LoginJob::ErrorCode::ERR_COULD_NOT_CONNECT) { | ||
165 | return KAsync::error(CouldNotConnectError, "Failed to connect: " + error.errorMessage); | ||
166 | } else if (error.errorCode == KIMAP2::LoginJob::ErrorCode::ERR_SSL_HANDSHAKE_FAILED) { | ||
167 | return KAsync::error(SslHandshakeError, "Ssl handshake failed: " + error.errorMessage); | ||
168 | } | ||
169 | return KAsync::error(error); | ||
170 | } | ||
171 | return KAsync::null(); | ||
162 | }); | 172 | }); |
163 | } | 173 | } |
164 | 174 | ||