From b2a017303a34e248873b2e47e560a41dc4c5111c Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 2 Oct 2017 12:16:36 +0900 Subject: 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()). --- jobs/checkauthmethods.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'jobs/checkauthmethods.cpp') diff --git a/jobs/checkauthmethods.cpp b/jobs/checkauthmethods.cpp index 95b9a8f2..117def89 100644 --- a/jobs/checkauthmethods.cpp +++ b/jobs/checkauthmethods.cpp @@ -29,9 +29,9 @@ class CheckAuthMethods::Private QString session; }; -CheckAuthMethods::CheckAuthMethods(const ConnectionData* connection) - : BaseJob(connection, HttpVerb::Get, "CheckAuthMethods", - "_matrix/client/r0/login", Query(), Data(), false) +CheckAuthMethods::CheckAuthMethods() + : BaseJob(HttpVerb::Get, "CheckAuthMethods", + QStringLiteral("_matrix/client/r0/login"), Query(), Data(), false) , d(new Private) { } -- cgit v1.2.3