chore(clang-tidy): modernize the code

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2026-05-10 23:16:46 +03:00
parent 170d59de2a
commit 1af838db2e
No known key found for this signature in database
GPG key ID: 55EF5DA53DB36318
38 changed files with 1088 additions and 956 deletions

View file

@ -73,7 +73,7 @@ MSADeviceCodeStep::MSADeviceCodeStep(AccountData* data) : AuthStep(data)
emit finished(state, message);
});
connect(&m_oauth2, &QOAuth2DeviceAuthorizationFlow::serverReportedErrorOccurred, this,
[this](const QString& error, const QString& errorDescription, const QUrl& uri) {
[this](const QString& error, const QString& errorDescription, const QUrl& /*uri*/) {
qWarning() << "Failed to login because" << error << errorDescription;
emit finished(AccountTaskState::STATE_FAILED_HARD, errorDescription);
});
@ -97,21 +97,11 @@ void MSADeviceCodeStep::perform()
m_oauth2.grant();
}
struct DeviceAuthorizationResponse {
QString device_code;
QString user_code;
QString verification_uri;
int expires_in;
int interval;
QString error;
QString error_description;
};
void MSADeviceCodeStep::abort()
{
if (m_oauth2.isPolling())
if (m_oauth2.isPolling()) {
m_oauth2.stopTokenPolling();
}
emit finished(AccountTaskState::STATE_FAILED_HARD, tr("Task aborted"));
}