aboutsummaryrefslogtreecommitdiff
path: root/connection.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-09-02 11:52:32 +0900
committerGitHub <noreply@github.com>2017-09-02 11:52:32 +0900
commit59acb4e7eafb346cf76f086aba229a5ba9d8f1b2 (patch)
treed1524cb765ac742125f1dbc6228d4532b5de789f /connection.cpp
parent45c138903c20d32a8a69b5637a72898bc690f1f1 (diff)
parentb62149fdb0b5c247c075a1070bf4b75c1a3d057e (diff)
downloadlibquotient-59acb4e7eafb346cf76f086aba229a5ba9d8f1b2.tar.gz
libquotient-59acb4e7eafb346cf76f086aba229a5ba9d8f1b2.zip
Merge pull request #81 from delijati/master
Add Connection::leftRoom signal #80
Diffstat (limited to 'connection.cpp')
-rw-r--r--connection.cpp5
1 files changed, 4 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