From 23bc195b3c8558cb997789ca8772342612716993 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 22 Nov 2013 10:54:52 -0600 Subject: Implement removing accounts. --- logic/lists/MojangAccountList.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'logic/lists/MojangAccountList.cpp') diff --git a/logic/lists/MojangAccountList.cpp b/logic/lists/MojangAccountList.cpp index 32317f84..442ef3af 100644 --- a/logic/lists/MojangAccountList.cpp +++ b/logic/lists/MojangAccountList.cpp @@ -73,6 +73,14 @@ void MojangAccountList::removeAccount(const QString& username) onListChanged(); } +void MojangAccountList::removeAccount(QModelIndex index) +{ + beginResetModel(); + m_accounts.removeAt(index.row()); + endResetModel(); + onListChanged(); +} + void MojangAccountList::onListChanged() { -- cgit v1.2.3