aboutsummaryrefslogtreecommitdiff
path: root/jobs/postreceiptjob.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-10-02 12:16:36 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-10-13 10:37:16 +0200
commitb2a017303a34e248873b2e47e560a41dc4c5111c (patch)
tree2745b5d555b7689a448b6800503f6ff3f8201265 /jobs/postreceiptjob.cpp
parentc9dc5e12b835425f1ba5c447ddb3c3394ccac93e (diff)
downloadlibquotient-b2a017303a34e248873b2e47e560a41dc4c5111c.tar.gz
libquotient-b2a017303a34e248873b2e47e560a41dc4c5111c.zip
All jobs: Drop ConnectionData parameter from the constructor
Having to pass ConnectionData to each and every job class was nothing but boilerplate since the very beginning. Removing it required to prepend BaseJob::start() with ConnectionData-setting code, and to provide a way to alter the request configuration depending on the (late-coming) ConnectionData object. This is a new responsibility of BaseJob::start(); the previous BaseJob::start() contents have moved to BaseJob::sendRequest() (which is now invoked on retries, instead of start()).
Diffstat (limited to 'jobs/postreceiptjob.cpp')
-rw-r--r--jobs/postreceiptjob.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/jobs/postreceiptjob.cpp b/jobs/postreceiptjob.cpp
index 00926de6..4572d74c 100644
--- a/jobs/postreceiptjob.cpp
+++ b/jobs/postreceiptjob.cpp
@@ -20,8 +20,8 @@
using namespace QMatrixClient;
-PostReceiptJob::PostReceiptJob(const ConnectionData* connection,
- const QString& roomId, const QString& eventId)
- : BaseJob(connection, HttpVerb::Post, "PostReceiptJob",
- QString("/_matrix/client/r0/rooms/%1/receipt/m.read/%2").arg(roomId, eventId))
+PostReceiptJob::PostReceiptJob(const QString& roomId, const QString& eventId)
+ : BaseJob(HttpVerb::Post, "PostReceiptJob",
+ QStringLiteral("/_matrix/client/r0/rooms/%1/receipt/m.read/%2")
+ .arg(roomId, eventId))
{ }