summaryrefslogtreecommitdiffstats
path: root/gui/dialogs/AccountListDialog.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-11-18 12:58:03 -0600
committerAndrew <forkk@forkk.net>2013-11-18 12:58:03 -0600
commita9a0b65358b3799746fa9c8e1aa879e0b59ef526 (patch)
tree9db6881e5409495edefd9f04ab3cca5f82674778 /gui/dialogs/AccountListDialog.cpp
parentcdca53013990ac85967394529476712e6695bbf9 (diff)
downloadMultiMC-a9a0b65358b3799746fa9c8e1aa879e0b59ef526.tar
MultiMC-a9a0b65358b3799746fa9c8e1aa879e0b59ef526.tar.gz
MultiMC-a9a0b65358b3799746fa9c8e1aa879e0b59ef526.tar.lz
MultiMC-a9a0b65358b3799746fa9c8e1aa879e0b59ef526.tar.xz
MultiMC-a9a0b65358b3799746fa9c8e1aa879e0b59ef526.zip
Implement loading accounts from list.
Diffstat (limited to 'gui/dialogs/AccountListDialog.cpp')
-rw-r--r--gui/dialogs/AccountListDialog.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/gui/dialogs/AccountListDialog.cpp b/gui/dialogs/AccountListDialog.cpp
index 86d34de8..5a73cb18 100644
--- a/gui/dialogs/AccountListDialog.cpp
+++ b/gui/dialogs/AccountListDialog.cpp
@@ -23,13 +23,16 @@
#include <gui/dialogs/LoginDialog.h>
#include <gui/dialogs/ProgressDialog.h>
+#include <MultiMC.h>
+
AccountListDialog::AccountListDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::AccountListDialog)
{
ui->setupUi(this);
- ui->listView->setModel(&m_accounts);
+ m_accounts = MMC->accounts();
+ ui->listView->setModel(m_accounts.get());
}
AccountListDialog::~AccountListDialog()
@@ -84,7 +87,7 @@ void AccountListDialog::onLoginComplete()
{
// Add the authenticated account to the accounts list.
MojangAccountPtr account = m_authTask->getMojangAccount();
- m_accounts.addAccount(account);
+ m_accounts->addAccount(account);
//ui->listView->update();
}