1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 23:39:42 +01:00

better assert

This commit is contained in:
Leo Franchi 2012-02-24 16:49:14 -06:00
parent b51480f122
commit ea47a5556d

View File

@ -370,8 +370,9 @@ AccountModel::setData( const QModelIndex& index, const QVariant& value, int role
case AccountModelNode::UniqueFactoryType:
{
const Qt::CheckState state = static_cast< Qt::CheckState >( value.toInt() );
if ( node->accounts.isEmpty() && state == Qt::Checked )
if ( node->accounts.isEmpty() )
{
Q_ASSERT( state == Qt::Checked ); // How could we have a checked unique factory w/ no account??
// No account for this unique factory, create it
// Don't add it to node->accounts here, slot attached to accountmanager::accountcreated will do it for us
acct = node->factory->createAccount();