refactor: introduce RuntimeContext

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2022-07-11 09:01:07 +02:00
parent 9ec1c00887
commit 09e85e948c
26 changed files with 152 additions and 169 deletions

View File

@ -51,7 +51,7 @@ static bool isMinecraftVersion(const QString &uid)
return uid == "net.minecraft";
}
void VersionFile::applyTo(LaunchProfile *profile)
void VersionFile::applyTo(LaunchProfile *profile, const RuntimeContext & runtimeContext)
{
// Only real Minecraft can set those. Don't let anything override them.
if (isMinecraftVersion(uid))
@ -77,15 +77,15 @@ void VersionFile::applyTo(LaunchProfile *profile)
for (auto library : libraries)
{
profile->applyLibrary(library);
profile->applyLibrary(library, runtimeContext);
}
for (auto mavenFile : mavenFiles)
{
profile->applyMavenFile(mavenFile);
profile->applyMavenFile(mavenFile, runtimeContext);
}
for (auto agent : agents)
{
profile->applyAgent(agent);
profile->applyAgent(agent, runtimeContext);
}
profile->applyProblemSeverity(getProblemSeverity());
}