diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-05-08 21:38:44 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-05-09 05:30:31 +0900 |
commit | b903a3776aabb44863a9a9a4d83c6ee4e033cd5d (patch) | |
tree | b1cac87efaca564fe4ae01c9d1ff8f84f9810b14 /jobs | |
parent | 6431636e6a02d4fddb848e09e79156724e00f6f6 (diff) | |
download | libquotient-b903a3776aabb44863a9a9a4d83c6ee4e033cd5d.tar.gz libquotient-b903a3776aabb44863a9a9a4d83c6ee4e033cd5d.zip |
LeaveRoomJob now accepts a roomId, not a Room object; Room::leaveRoom() introduced; Connection and Room cleanup
Helps to better encapsulate Room
Diffstat (limited to 'jobs')
-rw-r--r-- | jobs/leaveroomjob.cpp | 6 | ||||
-rw-r--r-- | jobs/leaveroomjob.h | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/jobs/leaveroomjob.cpp b/jobs/leaveroomjob.cpp index 5557b8e4..f73919ac 100644 --- a/jobs/leaveroomjob.cpp +++ b/jobs/leaveroomjob.cpp @@ -18,11 +18,9 @@ #include "leaveroomjob.h" -#include "../room.h" - using namespace QMatrixClient; -LeaveRoomJob::LeaveRoomJob(const ConnectionData* data, Room* room) +LeaveRoomJob::LeaveRoomJob(const ConnectionData* data, const QString& roomId) : BaseJob(data, HttpVerb::Post, "LeaveRoomJob", - QString("_matrix/client/r0/rooms/%1/leave").arg(room->id())) + QStringLiteral("_matrix/client/r0/rooms/%1/leave").arg(roomId)) { } diff --git a/jobs/leaveroomjob.h b/jobs/leaveroomjob.h index 03851f4c..70883b68 100644 --- a/jobs/leaveroomjob.h +++ b/jobs/leaveroomjob.h @@ -22,11 +22,9 @@ namespace QMatrixClient { - class Room; - class LeaveRoomJob: public BaseJob { public: - LeaveRoomJob(const ConnectionData* data, Room* room); + LeaveRoomJob(const ConnectionData* data, const QString& roomId); }; -} +} // namespace QMatrixClient |