mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 18:09:59 +03:00
chore(clang-tidy): modernize the code
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
170d59de2a
commit
1af838db2e
38 changed files with 1088 additions and 956 deletions
|
|
@ -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"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue