From 73995106d3a0b9aa1b4285e2adf9803e41ce8c88 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 24 Oct 2021 18:16:00 -0500 Subject: [PATCH 1/3] NOISSUE Fix typo making Windows build fail --- notsecrets/launcher.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notsecrets/launcher.rc b/notsecrets/launcher.rc index d7e80888..f84104fb 100644 --- a/notsecrets/launcher.rc +++ b/notsecrets/launcher.rc @@ -3,8 +3,8 @@ #endif #include -IDI_ICON1 ICON DISCARDABLE "Laucher.ico" -1 RT_MANIFEST "Laucher.manifest" +IDI_ICON1 ICON DISCARDABLE "Launcher.ico" +1 RT_MANIFEST "Launcher.manifest" VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,0 @@ -18,7 +18,7 @@ BEGIN VALUE "CompanyName", "MultiMC Contributors" VALUE "FileDescription", "A Minecraft Launcher" VALUE "FileVersion", "1.0.0.0" - VALUE "ProductName", "Laucher" + VALUE "ProductName", "Launcher" VALUE "ProductVersion", "5" END END From 040af580701afa286b93a87e8bde42373add2bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 25 Oct 2021 12:00:25 +0200 Subject: [PATCH 2/3] NOISSUE add more logging when java checker fails to start --- launcher/java/JavaChecker.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/launcher/java/JavaChecker.cpp b/launcher/java/JavaChecker.cpp index d78d6505..81c61ab0 100644 --- a/launcher/java/JavaChecker.cpp +++ b/launcher/java/JavaChecker.cpp @@ -142,8 +142,12 @@ void JavaChecker::error(QProcess::ProcessError err) { if(err == QProcess::FailedToStart) { - killTimer.stop(); qDebug() << "Java checker has failed to start."; + qDebug() << "Process environment:"; + qDebug() << process->environment(); + qDebug() << "Native environment:"; + qDebug() << QProcessEnvironment::systemEnvironment().toStringList(); + killTimer.stop(); JavaCheckResult result; { result.path = m_path; From 85ecbad46755d42e3e0682dfe24e587ee3157565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 25 Oct 2021 21:43:00 +0200 Subject: [PATCH 3/3] GH-3490 sort instances by name is now aware of numbers --- launcher/InstanceProxyModel.cpp | 6 +++++- launcher/InstanceProxyModel.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/launcher/InstanceProxyModel.cpp b/launcher/InstanceProxyModel.cpp index 0311c239..9ee38a65 100644 --- a/launcher/InstanceProxyModel.cpp +++ b/launcher/InstanceProxyModel.cpp @@ -5,6 +5,10 @@ InstanceProxyModel::InstanceProxyModel(QObject *parent) : GroupedProxyModel(parent) { + m_naturalSort.setNumericMode(true); + m_naturalSort.setCaseSensitivity(Qt::CaseSensitivity::CaseInsensitive); + // FIXME: use loaded translation as source of locale instead, hook this up to translation changes + m_naturalSort.setLocale(QLocale::system()); } QVariant InstanceProxyModel::data(const QModelIndex & index, int role) const @@ -29,6 +33,6 @@ bool InstanceProxyModel::subSortLessThan(const QModelIndex &left, } else { - return QString::localeAwareCompare(pdataLeft->name(), pdataRight->name()) < 0; + return m_naturalSort.compare(pdataLeft->name(), pdataRight->name()) < 0; } } diff --git a/launcher/InstanceProxyModel.h b/launcher/InstanceProxyModel.h index fab6f834..baf2794b 100644 --- a/launcher/InstanceProxyModel.h +++ b/launcher/InstanceProxyModel.h @@ -1,6 +1,7 @@ #pragma once #include "groupview/GroupedProxyModel.h" +#include /** * A proxy model that is responsible for sorting instances into groups @@ -13,4 +14,6 @@ public: protected: virtual bool subSortLessThan(const QModelIndex &left, const QModelIndex &right) const override; +private: + QCollator m_naturalSort; };