From 52054469cd351002143b30d5bb1d8160cdf4b085 Mon Sep 17 00:00:00 2001 From: TheKodeToad Date: Wed, 7 Jun 2023 22:39:12 +0100 Subject: [PATCH] Fix *bug* lol Signed-off-by: TheKodeToad --- launcher/java/JavaInstallList.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/launcher/java/JavaInstallList.cpp b/launcher/java/JavaInstallList.cpp index b29af8576..9277203a4 100644 --- a/launcher/java/JavaInstallList.cpp +++ b/launcher/java/JavaInstallList.cpp @@ -98,6 +98,8 @@ QVariant JavaInstallList::data(const QModelIndex &index, int role) const auto version = std::dynamic_pointer_cast(m_vlist[index.row()]); switch (role) { + case SortRole: + return -index.row(); case VersionPointerRole: return QVariant::fromValue(m_vlist[index.row()]); case VersionIdRole: @@ -117,7 +119,7 @@ QVariant JavaInstallList::data(const QModelIndex &index, int role) const BaseVersionList::RoleList JavaInstallList::providesRoles() const { - return {VersionPointerRole, VersionIdRole, VersionRole, RecommendedRole, PathRole, ArchitectureRole}; + return {VersionPointerRole, VersionIdRole, VersionRole, RecommendedRole, LatestRole, PathRole, ArchitectureRole}; }