diff options
author | KitsuneRal <KitsuneRal@users.noreply.github.com> | 2016-06-01 20:58:25 +0900 |
---|---|---|
committer | KitsuneRal <KitsuneRal@users.noreply.github.com> | 2016-06-01 20:58:25 +0900 |
commit | 43ecbf3135687b2e5a5a604a902f992139cce428 (patch) | |
tree | d717d85e8b5d340050c317418e26addf1766a826 /jobs/passwordlogin.cpp | |
parent | d5df4568d34487aea519ae97dd1666927dcfb62b (diff) | |
parent | 46050cd59a7af8cc7d616fab1a80db95dc8b5b35 (diff) | |
download | libquotient-43ecbf3135687b2e5a5a604a902f992139cce428.tar.gz libquotient-43ecbf3135687b2e5a5a604a902f992139cce428.zip |
Merge pull request #9 from Fxrh/code-tweaks
Code tweaks
Diffstat (limited to 'jobs/passwordlogin.cpp')
-rw-r--r-- | jobs/passwordlogin.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/jobs/passwordlogin.cpp b/jobs/passwordlogin.cpp index d989815f..9f0cb2e1 100644 --- a/jobs/passwordlogin.cpp +++ b/jobs/passwordlogin.cpp @@ -39,7 +39,7 @@ class PasswordLogin::Private }; PasswordLogin::PasswordLogin(ConnectionData* connection, QString user, QString password) - : BaseJob(connection, JobHttpType::PostJob, false) + : BaseJob(connection, JobHttpType::PostJob, "PasswordLogin", false) , d(new Private) { d->user = user; @@ -66,12 +66,12 @@ QString PasswordLogin::server() return d->returned_server; } -QString PasswordLogin::apiPath() +QString PasswordLogin::apiPath() const { return "_matrix/client/r0/login"; } -QJsonObject PasswordLogin::data() +QJsonObject PasswordLogin::data() const { QJsonObject json; json.insert("type", "m.login.password"); @@ -88,9 +88,7 @@ void PasswordLogin::parseJson(const QJsonDocument& data) fail( BaseJob::UserDefinedError, "Unexpected data" ); } d->returned_token = json.value("access_token").toString(); - qDebug() << d->returned_token; d->returned_server = json.value("home_server").toString(); d->returned_id = json.value("user_id").toString(); - connection()->setToken(d->returned_token); emitResult(); } |