diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-02-27 22:02:56 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-02-27 22:02:56 +0100 |
commit | a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5 (patch) | |
tree | 5fcdca854ff8c93ac6f5b5715a2ff3d0dc7a8ad8 /logic/minecraft/onesix/OneSixProfileStrategy.cpp | |
parent | 17ad1e64f824fba6d8f153191effdb2af7d387c8 (diff) | |
download | MultiMC-a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5.tar MultiMC-a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5.tar.gz MultiMC-a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5.tar.lz MultiMC-a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5.tar.xz MultiMC-a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5.zip |
NOISSUE move version file reading and writing to dedicated namespaces
Diffstat (limited to 'logic/minecraft/onesix/OneSixProfileStrategy.cpp')
-rw-r--r-- | logic/minecraft/onesix/OneSixProfileStrategy.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/logic/minecraft/onesix/OneSixProfileStrategy.cpp b/logic/minecraft/onesix/OneSixProfileStrategy.cpp index 35ca769f..7dca3619 100644 --- a/logic/minecraft/onesix/OneSixProfileStrategy.cpp +++ b/logic/minecraft/onesix/OneSixProfileStrategy.cpp @@ -1,5 +1,6 @@ #include "OneSixProfileStrategy.h" #include "OneSixInstance.h" +#include "OneSixVersionFormat.h" #include "minecraft/VersionBuildError.h" #include "minecraft/MinecraftVersionList.h" @@ -55,7 +56,7 @@ void OneSixProfileStrategy::upgradeDeprecatedFiles() file->fileId = "net.minecraft"; file->version = file->id; file->name = "Minecraft"; - auto data = file->toJson(false).toJson(); + auto data = OneSixVersionFormat::toJson(file, false).toJson(); QSaveFile newPatchFile(mcJson); if(!newPatchFile.open(QIODevice::WriteOnly)) { @@ -300,7 +301,7 @@ bool OneSixProfileStrategy::customizePatch(ProfilePatchPtr patch) { return false; } - auto document = patch->toJson(true); + auto document = OneSixVersionFormat::toJson(patch, true); jsonFile.write(document.toJson()); if(!jsonFile.commit()) { @@ -403,7 +404,7 @@ bool OneSixProfileStrategy::installJarMods(QStringList filepaths) << "for reading:" << file.errorString(); return false; } - file.write(f->toJson(true).toJson()); + file.write(OneSixVersionFormat::toJson(f, true).toJson()); file.close(); profile->appendPatch(f); } |