aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorPandaNinjas <admin@malwarefight.wip.la>2023-06-07 22:13:57 -0400
committerGitHub <noreply@github.com>2023-06-07 22:13:57 -0400
commit11cbeb8f96b9e6bc86290581128e28554123a427 (patch)
tree0bb1133d6afd8eb455caf79e5be47e25cd5a5d1b /launcher
parent886b372adef86d84ca50d2e3e5b7ac39f1a5a42e (diff)
downloadPrismLauncher-11cbeb8f96b9e6bc86290581128e28554123a427.tar.gz
PrismLauncher-11cbeb8f96b9e6bc86290581128e28554123a427.tar.bz2
PrismLauncher-11cbeb8f96b9e6bc86290581128e28554123a427.zip
Fix shadowing and add copyright header
Signed-off-by: PandaNinjas <admin@malwarefight.wip.la>
Diffstat (limited to 'launcher')
-rw-r--r--launcher/VersionProxyModel.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/launcher/VersionProxyModel.cpp b/launcher/VersionProxyModel.cpp
index 3c294873..15ae1cc3 100644
--- a/launcher/VersionProxyModel.cpp
+++ b/launcher/VersionProxyModel.cpp
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* PolyMC - Minecraft Launcher
+ * Prism Launcher - Minecraft Launcher
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
- *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
@@ -187,13 +187,13 @@ QVariant VersionProxyModel::data(const QModelIndex &index, int role) const
}
case Qt::ToolTipRole: {
if (column == Name && hasRecommended) {
- auto value = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
- if(value.toBool()) {
+ auto recommendedValue = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
+ if(recommendedValue.toBool()) {
return tr("Recommended");
}
else if(hasLatest) {
- auto value = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
- if(value.toBool())
+ auto latestValue = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
+ if(latestValue.toBool())
{
return tr("Latest");
}
@@ -206,12 +206,12 @@ QVariant VersionProxyModel::data(const QModelIndex &index, int role) const
}
case Qt::DecorationRole: {
if (column == Name && hasRecommended) {
- auto value = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
- if(value.toBool()) {
+ auto recommendedValue = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
+ if(recommendedValue.toBool()) {
return APPLICATION->getThemedIcon("star");
} else if(hasLatest) {
- auto value = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
- if(value.toBool()) {
+ auto latestValue = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
+ if(latestValue.toBool()) {
return APPLICATION->getThemedIcon("bug");
}
}