diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/domain/applicationdomaintype.h | 1 | ||||
-rw-r--r-- | common/synchronizer.cpp | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 518f6d5..f7fd07e 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -101,6 +101,7 @@ enum SINK_EXPORT ErrorCode { | |||
101 | LoginError, | 101 | LoginError, |
102 | ConfigurationError, | 102 | ConfigurationError, |
103 | TransmissionError, | 103 | TransmissionError, |
104 | ConnectionLostError, | ||
104 | }; | 105 | }; |
105 | 106 | ||
106 | enum SINK_EXPORT SuccessCode { | 107 | enum SINK_EXPORT SuccessCode { |
diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index b6e33d5..46d3980 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp | |||
@@ -344,8 +344,11 @@ void Synchronizer::setStatusFromResult(const KAsync::Error &error, const QString | |||
344 | } else if (error.errorCode == ApplicationDomain::LoginError) { | 344 | } else if (error.errorCode == ApplicationDomain::LoginError) { |
345 | //If we failed to login altough we could connect that indicates a problem with our setup. | 345 | //If we failed to login altough we could connect that indicates a problem with our setup. |
346 | setStatus(ApplicationDomain::ErrorStatus, s, requestId); | 346 | setStatus(ApplicationDomain::ErrorStatus, s, requestId); |
347 | } else if (error.errorCode == ApplicationDomain::ConnectionLostError) { | ||
348 | //We've lost the connection so we assume the connection to the server broke. | ||
349 | setStatus(ApplicationDomain::OfflineStatus, s, requestId); | ||
347 | } | 350 | } |
348 | //We don't know what kind of error this was, so we assume it's transient and don't change ou status. | 351 | //We don't know what kind of error this was, so we assume it's transient and don't change our status. |
349 | } else { | 352 | } else { |
350 | //An operation against the server worked, so we're probably online. | 353 | //An operation against the server worked, so we're probably online. |
351 | setStatus(ApplicationDomain::ConnectedStatus, s, requestId); | 354 | setStatus(ApplicationDomain::ConnectedStatus, s, requestId); |