summaryrefslogtreecommitdiffstats
path: root/application/MultiMC.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-10-03 00:55:54 +0200
committerPetr Mrázek <peterix@gmail.com>2016-10-26 18:21:24 +0200
commitd66fdcd4cc6913508d2987c14cd9fc4d6760b8a5 (patch)
tree4f385106ce732d4f7338feab5391f2a06c68a0e6 /application/MultiMC.cpp
parentbbe139dce51a7965394c800cac974946820d3869 (diff)
downloadMultiMC-d66fdcd4cc6913508d2987c14cd9fc4d6760b8a5.tar
MultiMC-d66fdcd4cc6913508d2987c14cd9fc4d6760b8a5.tar.gz
MultiMC-d66fdcd4cc6913508d2987c14cd9fc4d6760b8a5.tar.lz
MultiMC-d66fdcd4cc6913508d2987c14cd9fc4d6760b8a5.tar.xz
MultiMC-d66fdcd4cc6913508d2987c14cd9fc4d6760b8a5.zip
NOISSUE Granular instance reload
Diffstat (limited to 'application/MultiMC.cpp')
-rw-r--r--application/MultiMC.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 6d671bd4..a226f3b7 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -25,6 +25,9 @@
#include <QStyleFactory>
#include "InstanceList.h"
+#include "FolderInstanceProvider.h"
+#include "minecraft/ftb/FTBInstanceProvider.h"
+
#include <minecraft/auth/MojangAccountList.h>
#include "icons/IconList.h"
//FIXME: get rid of this
@@ -261,10 +264,13 @@ MultiMC::MultiMC(int &argc, char **argv, bool test_mode) : QApplication(argc, ar
<< "Your instance path contains \'!\' and this is known to cause java problems";
}
m_instances.reset(new InstanceList(m_settings, InstDirSetting->get().toString(), this));
+ m_instanceFolder = new FolderInstanceProvider(m_settings, instDir);
+ connect(InstDirSetting.get(), &Setting::SettingChanged, m_instanceFolder, &FolderInstanceProvider::on_InstFolderChanged);
+ m_instances->addInstanceProvider(m_instanceFolder);
+ m_instances->addInstanceProvider(new FTBInstanceProvider(m_settings));
+
qDebug() << "Loading Instances...";
- m_instances->loadList();
- connect(InstDirSetting.get(), SIGNAL(SettingChanged(const Setting &, QVariant)),
- m_instances.get(), SLOT(on_InstFolderChanged(const Setting &, QVariant)));
+ m_instances->loadList(true);
// and accounts
m_accounts.reset(new MojangAccountList(this));
@@ -1007,7 +1013,7 @@ void MultiMC::onExit()
{
if(m_instances)
{
- m_instances->saveGroupList();
+ // m_instances->saveGroupList();
}
ENV.destroy();
if(logFile)