Apply suggestions from code review
Co-authored-by: TheKodeToad <TheKodeToad@proton.me> Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
0a71b19509
commit
38d3f14f06
1 changed files with 4 additions and 4 deletions
|
@ -265,9 +265,9 @@ void ProfileSetupDialog::setupProfileFinished()
|
||||||
auto parsedError = MojangError::fromJSON(*m_profile_response);
|
auto parsedError = MojangError::fromJSON(*m_profile_response);
|
||||||
ui->errorLabel->setVisible(true);
|
ui->errorLabel->setVisible(true);
|
||||||
|
|
||||||
QString errorMessage = tr("Network error(%1): %2: HTTP Status: %3")
|
QString errorMessage =
|
||||||
.arg(QString::number(m_profile_task->error()), m_profile_task->errorString(),
|
tr("Network Error: %1\nHTTP Status: %2").arg(m_profile_task->errorString(), QString::number(m_profile_task->replyStatusCode()));
|
||||||
QString::number(m_profile_task->replyStatusCode()));
|
|
||||||
|
|
||||||
if (parsedError.fullyParsed) {
|
if (parsedError.fullyParsed) {
|
||||||
errorMessage += "Path: " + parsedError.path + "\n";
|
errorMessage += "Path: " + parsedError.path + "\n";
|
||||||
|
@ -278,7 +278,7 @@ void ProfileSetupDialog::setupProfileFinished()
|
||||||
errorMessage += "Log:\n" + parsedError.rawError + "\n";
|
errorMessage += "Log:\n" + parsedError.rawError + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->errorLabel->setText(tr("The server returned the following error:") + "\n\n" + errorMessage);
|
ui->errorLabel->setText(tr("The server responded with the following error:") + "\n\n" + errorMessage);
|
||||||
qDebug() << parsedError.rawError;
|
qDebug() << parsedError.rawError;
|
||||||
auto button = ui->buttonBox->button(QDialogButtonBox::Cancel);
|
auto button = ui->buttonBox->button(QDialogButtonBox::Cancel);
|
||||||
button->setEnabled(true);
|
button->setEnabled(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue