Merge pull request #1128 from pandaninjas/fix-implicit-fallthrough

This commit is contained in:
Sefa Eyeoglu 2023-07-07 15:19:00 +02:00
parent bab7105820
commit 6f1d594f1c
No known key found for this signature in database
GPG key ID: E13DFD4B47127951
15 changed files with 45 additions and 35 deletions

View file

@ -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: