summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/imapresource/imapresource.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp
index e7458f6..90383e0 100644
--- a/examples/imapresource/imapresource.cpp
+++ b/examples/imapresource/imapresource.cpp
@@ -506,12 +506,16 @@ public:
506 KAsync::Error getError(const KAsync::Error &error) 506 KAsync::Error getError(const KAsync::Error &error)
507 { 507 {
508 if (error) { 508 if (error) {
509 if (error.errorCode == Imap::CouldNotConnectError) { 509 switch(error.errorCode) {
510 return {ApplicationDomain::ConnectionError, error.errorMessage}; 510 case Imap::CouldNotConnectError:
511 } else if (error.errorCode == Imap::SslHandshakeError) { 511 return {ApplicationDomain::ConnectionError, error.errorMessage};
512 return {ApplicationDomain::LoginError, error.errorMessage}; 512 case Imap::SslHandshakeError:
513 return {ApplicationDomain::LoginError, error.errorMessage};
514 case Imap::HostNotFoundError:
515 return {ApplicationDomain::NoServerError, error.errorMessage};
516 default:
517 return {ApplicationDomain::UnknownError, error.errorMessage};
513 } 518 }
514 return {ApplicationDomain::UnknownError, error.errorMessage};
515 } 519 }
516 return {}; 520 return {};
517 } 521 }