aboutsummaryrefslogtreecommitdiff
path: root/jobs/passwordlogin.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-07 17:55:25 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-07 17:55:25 +0900
commit6453ab3ea9a2781940d60e49bc28c38db0fbac79 (patch)
tree8747527c53717e79f5bcae22020fd85f1115265d /jobs/passwordlogin.cpp
parent879e0bd17abedcc93d005eb7b66f6e9aa762200a (diff)
downloadlibquotient-6453ab3ea9a2781940d60e49bc28c38db0fbac79.tar.gz
libquotient-6453ab3ea9a2781940d60e49bc28c38db0fbac79.zip
PasswordLogin: Fix the legacy job class to compile with new BaseJob::Data
Diffstat (limited to 'jobs/passwordlogin.cpp')
-rw-r--r--jobs/passwordlogin.cpp17
1 files changed, 7 insertions, 10 deletions
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()