From bb62fd60471d426f6928755e18a8d3d20318efe7 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Tue, 22 May 2012 10:34:08 -0400 Subject: [PATCH] Try harder to find an account --- src/libtomahawk/accounts/AccountModel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libtomahawk/accounts/AccountModel.cpp b/src/libtomahawk/accounts/AccountModel.cpp index 73550b688..822acd6e7 100644 --- a/src/libtomahawk/accounts/AccountModel.cpp +++ b/src/libtomahawk/accounts/AccountModel.cpp @@ -729,6 +729,12 @@ AccountModel::indexForAtticaId( const QString& resolverId ) const { return index( i, 0, QModelIndex() ); } + else if ( m_accounts[ i ]->type == AccountModelNode::CustomAccountType && qobject_cast< CustomAtticaAccount* >( m_accounts[ i ]->customAccount ) ) + { + const CustomAtticaAccount* atticaAcct = qobject_cast< CustomAtticaAccount* >( m_accounts[ i ]->customAccount ); + if ( atticaAcct->atticaContent().id() == resolverId ) + return index( i, 0, QModelIndex() ); + } } return QModelIndex();