1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Extra safety, but wtf

This commit is contained in:
Leo Franchi 2012-06-11 11:03:15 +02:00
parent 36bbeb9d5a
commit 26729f6f87

View File

@ -496,9 +496,14 @@ AccountModel::setData( const QModelIndex& index, const QVariant& value, int role
if ( node->type == AccountModelNode::FactoryType )
{
// Turn on or off all accounts for this factory\
tLog() << "Factory account with members:" << node->accounts << node->accounts.size();
// Turn on or off all accounts for this factory
foreach ( Account* acct, node->accounts )
{
tLog() << "Account we are toggling for factory:" << acct;
if ( !acct )
continue;
checkState == Qt::Checked ? AccountManager::instance()->enableAccount( acct )
: AccountManager::instance()->disableAccount( acct );
}