Fix some typos
Signed-off-by: Ben Westover <me@benthetechguy.net> (cherry picked from commit f6511c601e1fd63a864f1681beef0f85adfe6f7e)
This commit is contained in:
parent
698a838b56
commit
d105d76f2a
@ -74,12 +74,12 @@ void MSADeviceCodeStep::perform()
|
||||
m_task->setAskRetry(false);
|
||||
m_task->addNetAction(m_request);
|
||||
|
||||
connect(m_task.get(), &Task::finished, this, &MSADeviceCodeStep::deviceAutorizationFinished);
|
||||
connect(m_task.get(), &Task::finished, this, &MSADeviceCodeStep::deviceAuthorizationFinished);
|
||||
|
||||
m_task->start();
|
||||
}
|
||||
|
||||
struct DeviceAutorizationResponse {
|
||||
struct DeviceAuthorizationResponse {
|
||||
QString device_code;
|
||||
QString user_code;
|
||||
QString verification_uri;
|
||||
@ -90,17 +90,17 @@ struct DeviceAutorizationResponse {
|
||||
QString error_description;
|
||||
};
|
||||
|
||||
DeviceAutorizationResponse parseDeviceAutorizationResponse(const QByteArray& data)
|
||||
DeviceAuthorizationResponse parseDeviceAuthorizationResponse(const QByteArray& data)
|
||||
{
|
||||
QJsonParseError err;
|
||||
QJsonDocument doc = QJsonDocument::fromJson(data, &err);
|
||||
if (err.error != QJsonParseError::NoError) {
|
||||
qWarning() << "Failed to parse device autorization response due to err:" << err.errorString();
|
||||
qWarning() << "Failed to parse device authorization response due to err:" << err.errorString();
|
||||
return {};
|
||||
}
|
||||
|
||||
if (!doc.isObject()) {
|
||||
qWarning() << "Device autorization response is not an object";
|
||||
qWarning() << "Device authorization response is not an object";
|
||||
return {};
|
||||
}
|
||||
auto obj = doc.object();
|
||||
@ -111,9 +111,9 @@ DeviceAutorizationResponse parseDeviceAutorizationResponse(const QByteArray& dat
|
||||
};
|
||||
}
|
||||
|
||||
void MSADeviceCodeStep::deviceAutorizationFinished()
|
||||
void MSADeviceCodeStep::deviceAuthorizationFinished()
|
||||
{
|
||||
auto rsp = parseDeviceAutorizationResponse(*m_response);
|
||||
auto rsp = parseDeviceAuthorizationResponse(*m_response);
|
||||
if (!rsp.error.isEmpty() || !rsp.error_description.isEmpty()) {
|
||||
qWarning() << "Device authorization failed:" << rsp.error;
|
||||
emit finished(AccountTaskState::STATE_FAILED_HARD,
|
||||
@ -208,12 +208,12 @@ AuthenticationResponse parseAuthenticationResponse(const QByteArray& data)
|
||||
QJsonParseError err;
|
||||
QJsonDocument doc = QJsonDocument::fromJson(data, &err);
|
||||
if (err.error != QJsonParseError::NoError) {
|
||||
qWarning() << "Failed to parse device autorization response due to err:" << err.errorString();
|
||||
qWarning() << "Failed to parse device authorization response due to err:" << err.errorString();
|
||||
return {};
|
||||
}
|
||||
|
||||
if (!doc.isObject()) {
|
||||
qWarning() << "Device autorization response is not an object";
|
||||
qWarning() << "Device authorization response is not an object";
|
||||
return {};
|
||||
}
|
||||
auto obj = doc.object();
|
||||
@ -274,4 +274,4 @@ void MSADeviceCodeStep::authenticationFinished()
|
||||
m_data->msaToken.refresh_token = rsp.refresh_token;
|
||||
m_data->msaToken.token = rsp.access_token;
|
||||
emit finished(AccountTaskState::STATE_WORKING, tr("Got"));
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ class MSADeviceCodeStep : public AuthStep {
|
||||
void authorizeWithBrowser(QString url, QString code, int expiresIn);
|
||||
|
||||
private slots:
|
||||
void deviceAutorizationFinished();
|
||||
void deviceAuthorizationFinished();
|
||||
void startPoolTimer();
|
||||
void authenticateUser();
|
||||
void authenticationFinished();
|
||||
|
@ -132,9 +132,9 @@ class InstallJavaPage : public QWidget, public BasePage {
|
||||
m_recommended_majors = majors;
|
||||
recommendedFilterChanged();
|
||||
}
|
||||
void setRecomend(bool recomend)
|
||||
void setRecommend(bool recommend)
|
||||
{
|
||||
m_recommend = recomend;
|
||||
m_recommend = recommend;
|
||||
recommendedFilterChanged();
|
||||
}
|
||||
void recommendedFilterChanged()
|
||||
@ -202,7 +202,7 @@ InstallDialog::InstallDialog(const QString& uid, BaseInstance* instance, QWidget
|
||||
recommendedCheckBox->setCheckState(Qt::CheckState::Checked);
|
||||
connect(recommendedCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
|
||||
for (BasePage* page : container->getPages()) {
|
||||
pageCast(page)->setRecomend(state == Qt::Checked);
|
||||
pageCast(page)->setRecommend(state == Qt::Checked);
|
||||
}
|
||||
});
|
||||
|
||||
@ -261,7 +261,7 @@ InstallDialog::InstallDialog(const QString& uid, BaseInstance* instance, QWidget
|
||||
container->selectPage(page->id());
|
||||
|
||||
auto cast = pageCast(page);
|
||||
cast->setRecomend(true);
|
||||
cast->setRecommend(true);
|
||||
connect(cast, &InstallJavaPage::selectionChanged, this, [this, cast] { validate(cast); });
|
||||
if (!recommendedJavas.isEmpty()) {
|
||||
cast->setRecommendedMajors(recommendedJavas);
|
||||
@ -344,4 +344,4 @@ void InstallDialog::done(int result)
|
||||
|
||||
} // namespace Java
|
||||
|
||||
#include "InstallJavaDialog.moc"
|
||||
#include "InstallJavaDialog.moc"
|
||||
|
Loading…
Reference in New Issue
Block a user