NOISSUE Remove special FTB logic from generic version patch code
This commit is contained in:
@@ -34,7 +34,7 @@ int findLibraryByName(QList<OneSixLibraryPtr> haystack, const GradleSpecifier &n
|
||||
}
|
||||
|
||||
VersionFilePtr VersionFile::fromJson(const QJsonDocument &doc, const QString &filename,
|
||||
const bool requireOrder, const bool isFTB)
|
||||
const bool requireOrder)
|
||||
{
|
||||
VersionFilePtr out(new VersionFile());
|
||||
if (doc.isEmpty() || doc.isNull())
|
||||
@@ -84,11 +84,7 @@ VersionFilePtr VersionFile::fromJson(const QJsonDocument &doc, const QString &fi
|
||||
return QString();
|
||||
};
|
||||
|
||||
// FIXME: This should be ignored when applying.
|
||||
if (!isFTB)
|
||||
{
|
||||
readString("id", out->id);
|
||||
}
|
||||
readString("id", out->id);
|
||||
|
||||
readString("mainClass", out->mainClass);
|
||||
readString("appletClass", out->appletClass);
|
||||
@@ -143,24 +139,13 @@ VersionFilePtr VersionFile::fromJson(const QJsonDocument &doc, const QString &fi
|
||||
|
||||
if (root.contains("libraries"))
|
||||
{
|
||||
// FIXME: This should be done when applying.
|
||||
out->shouldOverwriteLibs = !isFTB;
|
||||
out->shouldOverwriteLibs = true;
|
||||
for (auto libVal : ensureArray(root.value("libraries")))
|
||||
{
|
||||
auto libObj = ensureObject(libVal);
|
||||
|
||||
auto lib = RawLibrary::fromJson(libObj, filename);
|
||||
// FIXME: This should be done when applying.
|
||||
if (isFTB)
|
||||
{
|
||||
lib->m_hint = "local";
|
||||
lib->insertType = RawLibrary::Prepend;
|
||||
out->addLibs.prepend(lib);
|
||||
}
|
||||
else
|
||||
{
|
||||
out->overwriteLibs.append(lib);
|
||||
}
|
||||
out->overwriteLibs.append(lib);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user