diff options
author | Andrew <forkk@forkk.net> | 2013-11-22 10:54:52 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-11-22 10:54:52 -0600 |
commit | 23bc195b3c8558cb997789ca8772342612716993 (patch) | |
tree | 65ef5ac8bb1b20e78b8531a151905e6d6f3c589b /gui/dialogs/AccountListDialog.cpp | |
parent | 69ac3e5a86d2a5602abc6e74904f29475b99a63c (diff) | |
download | MultiMC-23bc195b3c8558cb997789ca8772342612716993.tar MultiMC-23bc195b3c8558cb997789ca8772342612716993.tar.gz MultiMC-23bc195b3c8558cb997789ca8772342612716993.tar.lz MultiMC-23bc195b3c8558cb997789ca8772342612716993.tar.xz MultiMC-23bc195b3c8558cb997789ca8772342612716993.zip |
Implement removing accounts.
Diffstat (limited to 'gui/dialogs/AccountListDialog.cpp')
-rw-r--r-- | gui/dialogs/AccountListDialog.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gui/dialogs/AccountListDialog.cpp b/gui/dialogs/AccountListDialog.cpp index af074514..838bef7f 100644 --- a/gui/dialogs/AccountListDialog.cpp +++ b/gui/dialogs/AccountListDialog.cpp @@ -16,6 +16,8 @@ #include "AccountListDialog.h" #include "ui_AccountListDialog.h" +#include <QItemSelectionModel> + #include <logger/QsLog.h> #include <logic/auth/AuthenticateTask.h> @@ -48,7 +50,12 @@ void AccountListDialog::on_addAccountBtn_clicked() void AccountListDialog::on_rmAccountBtn_clicked() { - // TODO + QModelIndexList selection = ui->listView->selectionModel()->selectedIndexes(); + if (selection.size() > 0) + { + QModelIndex selected = selection.first(); + m_accounts->removeAccount(selected); + } } void AccountListDialog::on_editAccountBtn_clicked() |