Fix shadowing and add copyright header
Signed-off-by: PandaNinjas <admin@malwarefight.wip.la>
This commit is contained in:
parent
886b372ade
commit
11cbeb8f96
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user