Implement removing accounts.
This commit is contained in:
		@@ -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()
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -72,6 +72,11 @@ public:
 | 
			
		||||
	 */
 | 
			
		||||
	virtual void removeAccount(const QString& username);
 | 
			
		||||
 | 
			
		||||
	/*!
 | 
			
		||||
	 * Removes the account at the given QModelIndex.
 | 
			
		||||
	 */
 | 
			
		||||
	virtual void removeAccount(QModelIndex index);
 | 
			
		||||
 | 
			
		||||
	/*!
 | 
			
		||||
	 * \brief Finds an account by its username.
 | 
			
		||||
	 * \param The username of the account to find.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user