diff options
Diffstat (limited to 'jobs/passwordlogin.cpp')
-rw-r--r-- | jobs/passwordlogin.cpp | 17 |
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() |