diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2016-07-25 16:30:16 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2016-07-25 16:30:16 +0900 |
commit | dd2f1f29aa42dc2cbc1fa0163acd3a60e4d86f60 (patch) | |
tree | 5cecf100c8e145fc733ac46b1c002d338827fa13 | |
parent | 4134fa4133aedc824bcedc11402805773a2c6144 (diff) | |
download | libquotient-dd2f1f29aa42dc2cbc1fa0163acd3a60e4d86f60.tar.gz libquotient-dd2f1f29aa42dc2cbc1fa0163acd3a60e4d86f60.zip |
Make sync failure handler emit loginError instead of connectionError in case of access denial
-rw-r--r-- | connection.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/connection.cpp b/connection.cpp index 9664521c..38d27a63 100644 --- a/connection.cpp +++ b/connection.cpp @@ -117,8 +117,12 @@ SyncJob* Connection::sync(int timeout) d->processRooms(syncJob->roomData()); emit syncDone(); }); - connect( syncJob, &SyncJob::failure, - [=] () { emit connectionError(syncJob->errorString());}); + connect( syncJob, &SyncJob::failure, [=] () { + if (syncJob->error() == BaseJob::ContentAccessError) + emit loginError(syncJob->errorString()); + else + emit connectionError(syncJob->errorString()); + }); syncJob->start(); return syncJob; } |