From a2c08f646bf2d6fe0ce385940b5c1bb7b430d5fb Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 27 May 2016 16:49:15 +0900 Subject: Don't assign the token twice In a case when authentication doesn't even happen, PasswordLogin job won't run. The better place to assign (and log) the token is in Connection::connectWithToken(), therefore. --- jobs/passwordlogin.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'jobs') diff --git a/jobs/passwordlogin.cpp b/jobs/passwordlogin.cpp index d989815f..6cf45b26 100644 --- a/jobs/passwordlogin.cpp +++ b/jobs/passwordlogin.cpp @@ -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(); } -- cgit v1.2.3