diff options
author | Josip Delic <delijati@googlemail.com> | 2017-09-01 20:59:15 +0200 |
---|---|---|
committer | Josip Delic <delijati@googlemail.com> | 2017-09-01 20:59:15 +0200 |
commit | b62149fdb0b5c247c075a1070bf4b75c1a3d057e (patch) | |
tree | d1524cb765ac742125f1dbc6228d4532b5de789f | |
parent | 45c138903c20d32a8a69b5637a72898bc690f1f1 (diff) | |
download | libquotient-b62149fdb0b5c247c075a1070bf4b75c1a3d057e.tar.gz libquotient-b62149fdb0b5c247c075a1070bf4b75c1a3d057e.zip |
Add Connection::leftRoom signal
-rw-r--r-- | connection.cpp | 5 | ||||
-rw-r--r-- | connection.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/connection.cpp b/connection.cpp index f9f1490c..7920125d 100644 --- a/connection.cpp +++ b/connection.cpp @@ -207,7 +207,10 @@ JoinRoomJob* Connection::joinRoom(const QString& roomAlias) void Connection::leaveRoom(Room* room) { - callApi<LeaveRoomJob>(room->id()); + auto job = callApi<LeaveRoomJob>(room->id()); + connect( job, &BaseJob::success, [=] () { + emit leftRoom(room); + }); } RoomMessagesJob* Connection::getMessages(Room* room, const QString& from) const diff --git a/connection.h b/connection.h index e3f33155..0b8500b9 100644 --- a/connection.h +++ b/connection.h @@ -105,6 +105,7 @@ namespace QMatrixClient void syncDone(); void newRoom(Room* room); void joinedRoom(Room* room); + void leftRoom(Room* room); void loginError(QString error); void networkError(size_t nextAttempt, int inMilliseconds); |