From 6453ab3ea9a2781940d60e49bc28c38db0fbac79 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 7 Dec 2017 17:55:25 +0900 Subject: PasswordLogin: Fix the legacy job class to compile with new BaseJob::Data --- jobs/passwordlogin.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'jobs/passwordlogin.cpp') diff --git a/jobs/passwordlogin.cpp b/jobs/passwordlogin.cpp index 9af025e6..8abfe66a 100644 --- a/jobs/passwordlogin.cpp +++ b/jobs/passwordlogin.cpp @@ -29,18 +29,15 @@ class PasswordLogin::Private }; PasswordLogin::PasswordLogin(QString user, QString password) - : BaseJob(HttpVerb::Post, "PasswordLogin" - , "_matrix/client/r0/login" - , Query() - , Data( - { { "type", QStringLiteral("m.login.password") } - , { "user", user } - , { "password", password } - }) - , false - ) + : BaseJob(HttpVerb::Post, "PasswordLogin", + "_matrix/client/r0/login", Query(), Data(), false) , d(new Private) { + QJsonObject _data; + _data.insert("type", QStringLiteral("m.login.password")); + _data.insert("user", user); + _data.insert("password", password); + setRequestData(_data); } PasswordLogin::~PasswordLogin() -- cgit v1.2.3