NOISSUE fix some build fails on linux and windows

This commit is contained in:
Petr Mrázek 2021-02-07 23:51:10 +01:00
parent ab19b86341
commit 85d5e9ff23
2 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ void ATLauncher::loadIndexedPack(ATLauncher::IndexedPack & m, QJsonObject & obj)
loadIndexedVersion(version, versionObj);
m.versions.append(version);
}
m.system = Json::ensureBoolean(obj, "system", false);
m.system = Json::ensureBoolean(obj, QString("system"), false);
m.description = Json::ensureString(obj, "description", "");
m.safeName = Json::requireString(obj, "name").replace(QRegularExpression("[^A-Za-z0-9]"), "");

View File

@ -81,9 +81,9 @@ static ATLauncher::ModType parseModType(QString rawType) {
static void loadVersionLoader(ATLauncher::VersionLoader & p, QJsonObject & obj) {
p.type = Json::requireString(obj, "type");
p.latest = Json::ensureBoolean(obj, "latest", false);
p.choose = Json::ensureBoolean(obj, "choose", false);
p.recommended = Json::ensureBoolean(obj, "recommended", false);
p.latest = Json::ensureBoolean(obj, QString("latest"), false);
p.choose = Json::ensureBoolean(obj, QString("choose"), false);
p.recommended = Json::ensureBoolean(obj, QString("recommended"), false);
auto metadata = Json::requireObject(obj, "metadata");
p.version = Json::requireString(metadata, "version");
@ -141,7 +141,7 @@ void ATLauncher::loadVersion(PackVersion & v, QJsonObject & obj)
{
v.version = Json::requireString(obj, "version");
v.minecraft = Json::requireString(obj, "minecraft");
v.noConfigs = Json::ensureBoolean(obj, "noConfigs", false);
v.noConfigs = Json::ensureBoolean(obj, QString("noConfigs"), false);
if(obj.contains("mainClass")) {
auto main = Json::requireObject(obj, "mainClass");