diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-06-30 23:51:15 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-07-01 23:39:38 -0700 |
commit | 8d7dcdfc5b2a231a1304878e25929e6f4ff4e338 (patch) | |
tree | 761f56c74858e9811b9fa78ff63392f51836678c /launcher/ui/dialogs/ProfileSetupDialog.cpp | |
parent | 98d6904e4a84836c1b9ec662b0b8a49d5282e27b (diff) | |
download | PrismLauncher-8d7dcdfc5b2a231a1304878e25929e6f4ff4e338.tar.gz PrismLauncher-8d7dcdfc5b2a231a1304878e25929e6f4ff4e338.tar.bz2 PrismLauncher-8d7dcdfc5b2a231a1304878e25929e6f4ff4e338.zip |
chore: fix shadowed member and signed/unsigned mismatch
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
chore: supress unused with [[maybe_unused]]
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
chore: unshadow ^&^& static_cast implicit return
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
chore: deshadow and mark unused in parse task
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
chore: mark unused in folder models
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
chore: deshadow and mark unused with instances
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
chore: more deshadow and unused
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
chore: remove uneeded simicolons
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
chore: mark unused
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
chore: prevent shadow
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/dialogs/ProfileSetupDialog.cpp')
-rw-r--r-- | launcher/ui/dialogs/ProfileSetupDialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/launcher/ui/dialogs/ProfileSetupDialog.cpp b/launcher/ui/dialogs/ProfileSetupDialog.cpp index 64c0b924..758f7f23 100644 --- a/launcher/ui/dialogs/ProfileSetupDialog.cpp +++ b/launcher/ui/dialogs/ProfileSetupDialog.cpp @@ -167,14 +167,14 @@ void ProfileSetupDialog::checkName(const QString &name) { void ProfileSetupDialog::checkFinished( QNetworkReply::NetworkError error, - QByteArray data, - QList<QNetworkReply::RawHeaderPair> headers + QByteArray profileData, + [[maybe_unused]] QList<QNetworkReply::RawHeaderPair> headers ) { auto requestor = qobject_cast<AuthRequest *>(QObject::sender()); requestor->deleteLater(); if(error == QNetworkReply::NoError) { - auto doc = QJsonDocument::fromJson(data); + auto doc = QJsonDocument::fromJson(profileData); auto root = doc.object(); auto statusValue = root.value("status").toString("INVALID"); if(statusValue == "AVAILABLE") { @@ -210,11 +210,11 @@ void ProfileSetupDialog::setupProfile(const QString &profileName) { request.setRawHeader("Authorization", QString("Bearer %1").arg(token).toUtf8()); QString payloadTemplate("{\"profileName\":\"%1\"}"); - auto data = payloadTemplate.arg(profileName).toUtf8(); + auto profileData = payloadTemplate.arg(profileName).toUtf8(); AuthRequest *requestor = new AuthRequest(this); connect(requestor, &AuthRequest::finished, this, &ProfileSetupDialog::setupProfileFinished); - requestor->post(request, data); + requestor->post(request, profileData); isWorking = true; auto button = ui->buttonBox->button(QDialogButtonBox::Cancel); @@ -251,8 +251,8 @@ struct MojangError{ void ProfileSetupDialog::setupProfileFinished( QNetworkReply::NetworkError error, - QByteArray data, - QList<QNetworkReply::RawHeaderPair> headers + QByteArray errorData, + [[maybe_unused]] QList<QNetworkReply::RawHeaderPair> headers ) { auto requestor = qobject_cast<AuthRequest *>(QObject::sender()); requestor->deleteLater(); @@ -266,7 +266,7 @@ void ProfileSetupDialog::setupProfileFinished( accept(); } else { - auto parsedError = MojangError::fromJSON(data); + auto parsedError = MojangError::fromJSON(errorData); ui->errorLabel->setVisible(true); ui->errorLabel->setText(tr("The server returned the following error:") + "\n\n" + parsedError.errorMessage); qDebug() << parsedError.rawError; |