aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-30 23:51:15 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-01 23:39:38 -0700
commit8d7dcdfc5b2a231a1304878e25929e6f4ff4e338 (patch)
tree761f56c74858e9811b9fa78ff63392f51836678c /launcher/minecraft/auth
parent98d6904e4a84836c1b9ec662b0b8a49d5282e27b (diff)
downloadPrismLauncher-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/minecraft/auth')
-rw-r--r--launcher/minecraft/auth/AccountData.cpp4
-rw-r--r--launcher/minecraft/auth/AccountList.cpp2
-rw-r--r--launcher/minecraft/auth/Parsers.cpp8
-rw-r--r--launcher/minecraft/auth/steps/EntitlementsStep.cpp4
4 files changed, 9 insertions, 9 deletions
diff --git a/launcher/minecraft/auth/AccountData.cpp b/launcher/minecraft/auth/AccountData.cpp
index 44f7e256..334c63b5 100644
--- a/launcher/minecraft/auth/AccountData.cpp
+++ b/launcher/minecraft/auth/AccountData.cpp
@@ -310,7 +310,7 @@ bool AccountData::resumeStateFromV2(QJsonObject data) {
QJsonObject profileObject = profileVal.toObject();
QString id = profileObject.value("id").toString("");
QString name = profileObject.value("name").toString("");
- bool legacy = profileObject.value("legacy").toBool(false);
+ bool legacy_ = profileObject.value("legacy").toBool(false);
if (id.isEmpty() || name.isEmpty())
{
qWarning() << "Unable to load a profile" << name << "because it was missing an ID or a name.";
@@ -319,7 +319,7 @@ bool AccountData::resumeStateFromV2(QJsonObject data) {
if(id == currentProfile) {
currentProfileIndex = index;
}
- profiles.append({id, name, legacy});
+ profiles.append({id, name, legacy_});
}
auto & profile = profiles[currentProfileIndex];
diff --git a/launcher/minecraft/auth/AccountList.cpp b/launcher/minecraft/auth/AccountList.cpp
index c2794147..bf663f2d 100644
--- a/launcher/minecraft/auth/AccountList.cpp
+++ b/launcher/minecraft/auth/AccountList.cpp
@@ -365,7 +365,7 @@ QVariant AccountList::data(const QModelIndex &index, int role) const
}
}
-QVariant AccountList::headerData(int section, Qt::Orientation orientation, int role) const
+QVariant AccountList::headerData(int section, [[maybe_unused]] Qt::Orientation orientation, int role) const
{
switch (role)
{
diff --git a/launcher/minecraft/auth/Parsers.cpp b/launcher/minecraft/auth/Parsers.cpp
index f3d9ad56..98326272 100644
--- a/launcher/minecraft/auth/Parsers.cpp
+++ b/launcher/minecraft/auth/Parsers.cpp
@@ -107,16 +107,16 @@ bool parseXTokenResponse(QByteArray & data, Katabasis::Token &output, QString na
if(!item.isObject()) {
continue;
}
- auto obj = item.toObject();
- if(obj.contains("uhs")) {
+ auto obj_ = item.toObject();
+ if(obj_.contains("uhs")) {
foundUHS = true;
} else {
continue;
}
// consume all 'display claims' ... whatever that means
- for(auto iter = obj.begin(); iter != obj.end(); iter++) {
+ for(auto iter = obj_.begin(); iter != obj_.end(); iter++) {
QString claim;
- if(!getString(obj.value(iter.key()), claim)) {
+ if(!getString(obj_.value(iter.key()), claim)) {
qWarning() << "display claim " << iter.key() << " is not a string...";
return false;
}
diff --git a/launcher/minecraft/auth/steps/EntitlementsStep.cpp b/launcher/minecraft/auth/steps/EntitlementsStep.cpp
index bd604292..b5682708 100644
--- a/launcher/minecraft/auth/steps/EntitlementsStep.cpp
+++ b/launcher/minecraft/auth/steps/EntitlementsStep.cpp
@@ -35,9 +35,9 @@ void EntitlementsStep::rehydrate() {
}
void EntitlementsStep::onRequestDone(
- QNetworkReply::NetworkError error,
+ [[maybe_unused]] QNetworkReply::NetworkError error,
QByteArray data,
- QList<QNetworkReply::RawHeaderPair> headers
+ [[maybe_unused]] QList<QNetworkReply::RawHeaderPair> headers
) {
auto requestor = qobject_cast<AuthRequest *>(QObject::sender());
requestor->deleteLater();