aboutsummaryrefslogtreecommitdiff
path: root/launcher/java
diff options
context:
space:
mode:
authorRyan Cao <70191398+ryanccn@users.noreply.github.com>2022-11-14 19:26:31 +0800
committerGitHub <noreply@github.com>2022-11-14 19:26:31 +0800
commit2c9452efaf33cb22dbc29a4c6117a646f0de943f (patch)
treec5394f5194066989504b572c5a4aeeeb74d954d9 /launcher/java
parent97a7af855f8a96a0e73181c5e32a15bbd2cb67f2 (diff)
parent074b53eb6b71f948ff30aca601103672c5c4c812 (diff)
downloadPrismLauncher-2c9452efaf33cb22dbc29a4c6117a646f0de943f.tar.gz
PrismLauncher-2c9452efaf33cb22dbc29a4c6117a646f0de943f.tar.bz2
PrismLauncher-2c9452efaf33cb22dbc29a4c6117a646f0de943f.zip
Merge branch 'develop' into macos-add-to-path
Diffstat (limited to 'launcher/java')
-rw-r--r--launcher/java/JavaInstall.cpp7
-rw-r--r--launcher/java/JavaInstallList.cpp1
-rw-r--r--launcher/java/JavaVersion.cpp7
3 files changed, 8 insertions, 7 deletions
diff --git a/launcher/java/JavaInstall.cpp b/launcher/java/JavaInstall.cpp
index 5bcf7bcb..d5932bcb 100644
--- a/launcher/java/JavaInstall.cpp
+++ b/launcher/java/JavaInstall.cpp
@@ -1,9 +1,10 @@
#include "JavaInstall.h"
-#include <MMCStrings.h>
+
+#include "StringUtils.h"
bool JavaInstall::operator<(const JavaInstall &rhs)
{
- auto archCompare = Strings::naturalCompare(arch, rhs.arch, Qt::CaseInsensitive);
+ auto archCompare = StringUtils::naturalCompare(arch, rhs.arch, Qt::CaseInsensitive);
if(archCompare != 0)
return archCompare < 0;
if(id < rhs.id)
@@ -14,7 +15,7 @@ bool JavaInstall::operator<(const JavaInstall &rhs)
{
return false;
}
- return Strings::naturalCompare(path, rhs.path, Qt::CaseInsensitive) < 0;
+ return StringUtils::naturalCompare(path, rhs.path, Qt::CaseInsensitive) < 0;
}
bool JavaInstall::operator==(const JavaInstall &rhs)
diff --git a/launcher/java/JavaInstallList.cpp b/launcher/java/JavaInstallList.cpp
index 155c956a..e2f0aa00 100644
--- a/launcher/java/JavaInstallList.cpp
+++ b/launcher/java/JavaInstallList.cpp
@@ -41,7 +41,6 @@
#include "java/JavaInstallList.h"
#include "java/JavaCheckerJob.h"
#include "java/JavaUtils.h"
-#include "MMCStrings.h"
#include "minecraft/VersionFilterData.h"
JavaInstallList::JavaInstallList(QObject *parent) : BaseVersionList(parent)
diff --git a/launcher/java/JavaVersion.cpp b/launcher/java/JavaVersion.cpp
index 179ccd8d..0e4fc1d3 100644
--- a/launcher/java/JavaVersion.cpp
+++ b/launcher/java/JavaVersion.cpp
@@ -1,5 +1,6 @@
#include "JavaVersion.h"
-#include <MMCStrings.h>
+
+#include "StringUtils.h"
#include <QRegularExpression>
#include <QString>
@@ -98,12 +99,12 @@ bool JavaVersion::operator<(const JavaVersion &rhs)
else if(thisPre && rhsPre)
{
// both are prereleases - use natural compare...
- return Strings::naturalCompare(m_prerelease, rhs.m_prerelease, Qt::CaseSensitive) < 0;
+ return StringUtils::naturalCompare(m_prerelease, rhs.m_prerelease, Qt::CaseSensitive) < 0;
}
// neither is prerelease, so they are the same -> this cannot be less than rhs
return false;
}
- else return Strings::naturalCompare(m_string, rhs.m_string, Qt::CaseSensitive) < 0;
+ else return StringUtils::naturalCompare(m_string, rhs.m_string, Qt::CaseSensitive) < 0;
}
bool JavaVersion::operator==(const JavaVersion &rhs)