mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-04 04:16:57 +03:00
Merge pull request #1128 from pandaninjas/fix-implicit-fallthrough
This commit is contained in:
parent
bab7105820
commit
6f1d594f1c
15 changed files with 45 additions and 35 deletions
|
|
@ -187,35 +187,24 @@ QVariant VersionProxyModel::data(const QModelIndex &index, int role) const
|
|||
}
|
||||
case Qt::ToolTipRole:
|
||||
{
|
||||
switch(column)
|
||||
if(column == Name && hasRecommended)
|
||||
{
|
||||
case Name:
|
||||
auto value = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
|
||||
if(value.toBool())
|
||||
{
|
||||
if(hasRecommended)
|
||||
return tr("Recommended");
|
||||
} else if(hasLatest) {
|
||||
auto value = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
|
||||
if(value.toBool())
|
||||
{
|
||||
auto value = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
|
||||
if(value.toBool())
|
||||
{
|
||||
return tr("Recommended");
|
||||
}
|
||||
else if(hasLatest)
|
||||
{
|
||||
auto value = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
|
||||
if(value.toBool())
|
||||
{
|
||||
return tr("Latest");
|
||||
}
|
||||
}
|
||||
else if(index.row() == 0)
|
||||
{
|
||||
return tr("Latest");
|
||||
}
|
||||
return tr("Latest");
|
||||
}
|
||||
}
|
||||
default:
|
||||
} else if(index.row() == 0)
|
||||
{
|
||||
return sourceModel()->data(parentIndex, BaseVersionList::VersionIdRole);
|
||||
return tr("Latest");
|
||||
}
|
||||
} else {
|
||||
return sourceModel()->data(parentIndex, BaseVersionList::VersionIdRole);
|
||||
}
|
||||
}
|
||||
case Qt::DecorationRole:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue