summaryrefslogtreecommitdiffstats
path: root/logic/InstanceFactory.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-01 15:08:40 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-01 15:10:35 +0100
commit396e63500ec189b003d36504bae91a2b6a78a69d (patch)
treeb78022c1877536af1293a24d657a451085c55a4c /logic/InstanceFactory.cpp
parent6648c7ad903f4c8120193fa6f276ce8dde3b0b77 (diff)
downloadMultiMC-396e63500ec189b003d36504bae91a2b6a78a69d.tar
MultiMC-396e63500ec189b003d36504bae91a2b6a78a69d.tar.gz
MultiMC-396e63500ec189b003d36504bae91a2b6a78a69d.tar.lz
MultiMC-396e63500ec189b003d36504bae91a2b6a78a69d.tar.xz
MultiMC-396e63500ec189b003d36504bae91a2b6a78a69d.zip
Allow the use of synonyms in settings. Refactor settings.
Remove a bunch of obsolete/unused code.
Diffstat (limited to 'logic/InstanceFactory.cpp')
-rw-r--r--logic/InstanceFactory.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/logic/InstanceFactory.cpp b/logic/InstanceFactory.cpp
index 7c778035..1f1a5879 100644
--- a/logic/InstanceFactory.cpp
+++ b/logic/InstanceFactory.cpp
@@ -45,7 +45,7 @@ InstanceFactory::InstLoadError InstanceFactory::loadInstance(BaseInstance *&inst
{
auto m_settings = new INISettingsObject(PathCombine(instDir, "instance.cfg"));
- m_settings->registerSetting(new Setting("InstanceType", "Legacy"));
+ m_settings->registerSetting("InstanceType", "Legacy");
QString inst_type = m_settings->get("InstanceType").toString();
@@ -94,7 +94,7 @@ InstanceFactory::InstCreateError InstanceFactory::createInstance(BaseInstance *&
return InstanceFactory::NoSuchVersion;
auto m_settings = new INISettingsObject(PathCombine(instDir, "instance.cfg"));
- m_settings->registerSetting(new Setting("InstanceType", "Legacy"));
+ m_settings->registerSetting("InstanceType", "Legacy");
if (type == NormalInst)
{
@@ -171,7 +171,7 @@ InstanceFactory::InstCreateError InstanceFactory::copyInstance(BaseInstance *&ne
return InstanceFactory::CantCreateDir;
}
auto m_settings = new INISettingsObject(PathCombine(instDir, "instance.cfg"));
- m_settings->registerSetting(new Setting("InstanceType", "Legacy"));
+ m_settings->registerSetting("InstanceType", "Legacy");
QString inst_type = m_settings->get("InstanceType").toString();
if(inst_type == "OneSixFTB")