| 52 | } |
| 53 | |
| 54 | void XboxUserStep::onRequestDone() |
| 55 | { |
| 56 | if (m_request->error() != QNetworkReply::NoError) { |
| 57 | qWarning() << "Reply error:" << m_request->error(); |
| 58 | if (Net::isApplicationError(m_request->error())) { |
| 59 | emit finished(AccountTaskState::STATE_FAILED_SOFT, tr("XBox user authentication failed: %1").arg(m_request->errorString())); |
| 60 | } else { |
| 61 | emit finished(AccountTaskState::STATE_OFFLINE, tr("XBox user authentication failed: %1").arg(m_request->errorString())); |
| 62 | } |
| 63 | return; |
| 64 | } |
| 65 | |
| 66 | Token temp; |
| 67 | if (!Parsers::parseXTokenResponse(*m_response, temp, "UToken")) { |
| 68 | qWarning() << "Could not parse user authentication response..."; |
| 69 | emit finished(AccountTaskState::STATE_FAILED_SOFT, tr("XBox user authentication response could not be understood.")); |
| 70 | return; |
| 71 | } |
| 72 | m_data->userToken = temp; |
| 73 | emit finished(AccountTaskState::STATE_WORKING, tr("Got Xbox user token")); |
| 74 | } |
nothing calls this directly
no test coverage detected