mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-23 01:09:42 +01:00
Directly return when we know the final value
This commit is contained in:
parent
decd00318f
commit
4e845d3813
@ -263,17 +263,16 @@ PlayableProxyModel::nameFilterAcceptsRow( int sourceRow, PlayableItem* pi, const
|
||||
{
|
||||
QStringList sl = filterRegExp().pattern().split( " ", QString::SkipEmptyParts );
|
||||
|
||||
bool found = true;
|
||||
foreach( const QString& s, sl )
|
||||
{
|
||||
if ( !al->name().contains( s, Qt::CaseInsensitive ) &&
|
||||
!al->artist()->name().contains( s, Qt::CaseInsensitive ) )
|
||||
{
|
||||
found = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
return true;
|
||||
}
|
||||
|
||||
const Tomahawk::artist_ptr& ar = pi->artist();
|
||||
@ -281,16 +280,15 @@ PlayableProxyModel::nameFilterAcceptsRow( int sourceRow, PlayableItem* pi, const
|
||||
{
|
||||
QStringList sl = filterRegExp().pattern().split( " ", QString::SkipEmptyParts );
|
||||
|
||||
bool found = true;
|
||||
foreach( const QString& s, sl )
|
||||
{
|
||||
if ( !ar->name().contains( s, Qt::CaseInsensitive ) )
|
||||
{
|
||||
found = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user