NOISSUE slightly refactor jarMod entry reading
This commit is contained in:
parent
910766458d
commit
2aaf9827a6
@ -103,12 +103,6 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
|||||||
QJsonObject libObj = requireObject(libVal);
|
QJsonObject libObj = requireObject(libVal);
|
||||||
// parse the jarmod
|
// parse the jarmod
|
||||||
auto lib = OneSixVersionFormat::jarModFromJson(libObj, filename, out->name);
|
auto lib = OneSixVersionFormat::jarModFromJson(libObj, filename, out->name);
|
||||||
if(lib->originalName.isEmpty())
|
|
||||||
{
|
|
||||||
auto fixed = out->name;
|
|
||||||
fixed.remove(" (jar mod)");
|
|
||||||
lib->originalName = out->name;
|
|
||||||
}
|
|
||||||
// and add to jar mods
|
// and add to jar mods
|
||||||
out->jarMods.append(lib);
|
out->jarMods.append(lib);
|
||||||
}
|
}
|
||||||
@ -248,6 +242,12 @@ JarmodPtr OneSixVersionFormat::jarModFromJson(const QJsonObject &libObj, const Q
|
|||||||
}
|
}
|
||||||
out->name = libObj.value("name").toString();
|
out->name = libObj.value("name").toString();
|
||||||
out->originalName = libObj.value("originalName").toString();
|
out->originalName = libObj.value("originalName").toString();
|
||||||
|
if(out->originalName.isEmpty())
|
||||||
|
{
|
||||||
|
auto fixed = originalName;
|
||||||
|
fixed.remove(" (jar mod)");
|
||||||
|
out->originalName = originalName;
|
||||||
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user