From c329bc73c0c3830d2c2ec024c452b1a0e48e36a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 21 May 2017 22:24:06 +0200 Subject: NOISSUE more compiler warning removal --- api/logic/minecraft/ftb/LegacyFTBInstance.cpp | 7 ++----- api/logic/minecraft/ftb/LegacyFTBInstance.h | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'api/logic/minecraft/ftb') diff --git a/api/logic/minecraft/ftb/LegacyFTBInstance.cpp b/api/logic/minecraft/ftb/LegacyFTBInstance.cpp index a7091f1d..63412a33 100644 --- a/api/logic/minecraft/ftb/LegacyFTBInstance.cpp +++ b/api/logic/minecraft/ftb/LegacyFTBInstance.cpp @@ -12,13 +12,10 @@ QString LegacyFTBInstance::id() const return "FTB/" + BaseInstance::id(); } -void LegacyFTBInstance::copy(const QDir &newDir) +void LegacyFTBInstance::copy(SettingsObjectPtr newSettings, const QDir& newDir) { // set the target instance to be plain Legacy - INISettingsObject settings_obj(newDir.absoluteFilePath("instance.cfg")); - settings_obj.registerSetting("InstanceType", "Legacy"); - QString inst_type = settings_obj.get("InstanceType").toString(); - settings_obj.set("InstanceType", "Legacy"); + newSettings->set("InstanceType", "Legacy"); } QString LegacyFTBInstance::typeName() const diff --git a/api/logic/minecraft/ftb/LegacyFTBInstance.h b/api/logic/minecraft/ftb/LegacyFTBInstance.h index 8a97002a..2f2e34a2 100644 --- a/api/logic/minecraft/ftb/LegacyFTBInstance.h +++ b/api/logic/minecraft/ftb/LegacyFTBInstance.h @@ -8,7 +8,7 @@ class LegacyFTBInstance : public LegacyInstance public: explicit LegacyFTBInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir); QString id() const override; - void copy(const QDir &newDir) override; + void copy(SettingsObjectPtr newSettings, const QDir &newDir) override; QString typeName() const override; bool canExport() const override { -- cgit v1.2.3