Merge branch 'develop' into chore/add-compiler-warnings

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers 2023-07-13 20:05:16 -07:00 committed by GitHub
commit 520594e529
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 1569 additions and 761 deletions

View file

@ -193,27 +193,21 @@ 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 recommended = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
if (recommended.toBool()) {
return tr("Recommended");
} else if (hasLatest) {
auto latest = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
if (latest.toBool()) {
return tr("Latest");
}
}
return tr("Latest");
}
}
default:
{
return sourceModel()->data(parentIndex, BaseVersionList::VersionIdRole);
}
} else {
return sourceModel()->data(parentIndex, BaseVersionList::VersionIdRole);
}
}
case Qt::DecorationRole: