diff options
author | KitsuneRal <KitsuneRal@users.noreply.github.com> | 2016-07-28 16:49:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-28 16:49:48 +0900 |
commit | 67e761a7e62067cd511dee432ebd5f3e8313cecc (patch) | |
tree | a37bed075b245debaa24d535895fe3db5df2bbb1 | |
parent | 3c11f55bfd2b626e330277255bb0c38fbbae84fa (diff) | |
parent | dd2f1f29aa42dc2cbc1fa0163acd3a60e4d86f60 (diff) | |
download | libquotient-67e761a7e62067cd511dee432ebd5f3e8313cecc.tar.gz libquotient-67e761a7e62067cd511dee432ebd5f3e8313cecc.zip |
Merge pull request #14 from Fxrh/kitsune-sync-emits-loginerror
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; } |