summaryrefslogtreecommitdiffstats
path: root/logic/lists/MojangAccountList.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-11-22 10:54:52 -0600
committerAndrew <forkk@forkk.net>2013-11-22 10:54:52 -0600
commit23bc195b3c8558cb997789ca8772342612716993 (patch)
tree65ef5ac8bb1b20e78b8531a151905e6d6f3c589b /logic/lists/MojangAccountList.cpp
parent69ac3e5a86d2a5602abc6e74904f29475b99a63c (diff)
downloadMultiMC-23bc195b3c8558cb997789ca8772342612716993.tar
MultiMC-23bc195b3c8558cb997789ca8772342612716993.tar.gz
MultiMC-23bc195b3c8558cb997789ca8772342612716993.tar.lz
MultiMC-23bc195b3c8558cb997789ca8772342612716993.tar.xz
MultiMC-23bc195b3c8558cb997789ca8772342612716993.zip
Implement removing accounts.
Diffstat (limited to 'logic/lists/MojangAccountList.cpp')
-rw-r--r--logic/lists/MojangAccountList.cpp8
1 files changed, 8 insertions, 0 deletions
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()
{