mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-06 13:26:58 +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
|
|
@ -1,6 +1,7 @@
|
|||
#include <QDebug>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <utility>
|
||||
|
||||
#include "minecraft/auth/AccountData.h"
|
||||
#include "minecraft/auth/steps/EntitlementsStep.h"
|
||||
|
|
@ -17,7 +18,7 @@
|
|||
|
||||
#include <Application.h>
|
||||
|
||||
AuthFlow::AuthFlow(AccountData* data, Action action) : Task(), m_data(data)
|
||||
AuthFlow::AuthFlow(AccountData* data, Action action) : m_data(data)
|
||||
{
|
||||
if (data->type == AccountType::MSA) {
|
||||
if (action == Action::DeviceCode) {
|
||||
|
|
@ -75,11 +76,12 @@ void AuthFlow::nextStep()
|
|||
|
||||
void AuthFlow::stepFinished(AccountTaskState resultingState, QString message)
|
||||
{
|
||||
if (changeState(resultingState, message))
|
||||
if (changeState(resultingState, std::move(message))) {
|
||||
nextStep();
|
||||
}
|
||||
}
|
||||
|
||||
bool AuthFlow::changeState(AccountTaskState newState, QString reason)
|
||||
bool AuthFlow::changeState(AccountTaskState newState, const QString& reason)
|
||||
{
|
||||
m_taskState = newState;
|
||||
setDetails(reason);
|
||||
|
|
@ -148,8 +150,9 @@ bool AuthFlow::changeState(AccountTaskState newState, QString reason)
|
|||
}
|
||||
bool AuthFlow::abort()
|
||||
{
|
||||
if (m_currentStep)
|
||||
if (m_currentStep) {
|
||||
m_currentStep->abort();
|
||||
}
|
||||
emitAborted();
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue