diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-06-07 22:39:12 +0100 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2023-06-07 22:39:23 +0100 |
commit | 52054469cd351002143b30d5bb1d8160cdf4b085 (patch) | |
tree | 21890912edf131b712dfcab9f9a2672a92422f24 /launcher/java | |
parent | a2d0d5a71d37f39535154df1e6f740625817a9eb (diff) | |
download | PrismLauncher-52054469cd351002143b30d5bb1d8160cdf4b085.tar.gz PrismLauncher-52054469cd351002143b30d5bb1d8160cdf4b085.tar.bz2 PrismLauncher-52054469cd351002143b30d5bb1d8160cdf4b085.zip |
Fix *bug* lol
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/java')
-rw-r--r-- | launcher/java/JavaInstallList.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/launcher/java/JavaInstallList.cpp b/launcher/java/JavaInstallList.cpp index b29af857..9277203a 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<JavaInstall>(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}; } |