From 4fc4a172562a76091721b8c488aafbd6ed2b01ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 2 May 2015 12:44:37 +0200 Subject: NOISSUE handle recommended versions better Moved constants to the version data file Use recommended Minecraft instead of latest stable for new instances by default --- logic/java/JavaVersionList.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'logic/java/JavaVersionList.cpp') diff --git a/logic/java/JavaVersionList.cpp b/logic/java/JavaVersionList.cpp index d607ae72..7889853b 100644 --- a/logic/java/JavaVersionList.cpp +++ b/logic/java/JavaVersionList.cpp @@ -23,6 +23,7 @@ #include "java/JavaCheckerJob.h" #include "java/JavaUtils.h" #include "MMCStrings.h" +#include "minecraft/VersionFilterData.h" JavaVersionList::JavaVersionList(QObject *parent) : BaseVersionList(parent) { @@ -121,8 +122,8 @@ bool sortJavas(BaseVersionPtr left, BaseVersionPtr right) if(archCompare != 0) return archCompare > 0; // dirty hack - 1.9 and above is too new - auto labove19 = Strings::naturalCompare(rleft->name(), "1.9.0", Qt::CaseInsensitive) >= 0; - auto rabove19 = Strings::naturalCompare(rright->name(), "1.9.0", Qt::CaseInsensitive) >= 0; + auto labove19 = Strings::naturalCompare(rleft->name(), g_VersionFilterData.discouragedJavaVersion, Qt::CaseInsensitive) >= 0; + auto rabove19 = Strings::naturalCompare(rright->name(), g_VersionFilterData.discouragedJavaVersion, Qt::CaseInsensitive) >= 0; if(labove19 == rabove19) { // prefer higher versions in general -- cgit v1.2.3