From a9a0b65358b3799746fa9c8e1aa879e0b59ef526 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 18 Nov 2013 12:58:03 -0600 Subject: Implement loading accounts from list. --- MultiMC.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'MultiMC.cpp') diff --git a/MultiMC.cpp b/MultiMC.cpp index 1c70fb54..ae1401a6 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -10,6 +10,7 @@ #include "gui/MainWindow.h" #include "gui/dialogs/VersionSelectDialog.h" #include "logic/lists/InstanceList.h" +#include "logic/lists/MojangAccountList.h" #include "logic/lists/IconList.h" #include "logic/lists/LwjglVersionList.h" #include "logic/lists/MinecraftVersionList.h" @@ -146,6 +147,11 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv) connect(InstDirSetting, SIGNAL(settingChanged(const Setting &, QVariant)), m_instances.get(), SLOT(on_InstFolderChanged(const Setting &, QVariant))); + // and accounts + m_accounts.reset(new MojangAccountList(this)); + QLOG_INFO() << "Loading accounts..."; + m_accounts->loadList(); + // init the http meta cache initHttpMetaCache(); -- cgit v1.2.3 From 928e0d0b151a4690a5849c2ec4a44d97338937c5 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 19 Nov 2013 12:53:30 -0600 Subject: Implement saving account list to file Currently it only saves when accounts are added or removed. We'll have to fix this, but we need signals for when account objects change first. --- MultiMC.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'MultiMC.cpp') diff --git a/MultiMC.cpp b/MultiMC.cpp index ae1401a6..9179f0e0 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -150,6 +150,7 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv) // and accounts m_accounts.reset(new MojangAccountList(this)); QLOG_INFO() << "Loading accounts..."; + m_accounts->setListFilePath("accounts.json", true); m_accounts->loadList(); // init the http meta cache -- cgit v1.2.3