mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
Don't use QRegExp if we can have a built-in function
This commit is contained in:
@@ -538,7 +538,7 @@ Tomahawk::DatabaseImpl::getTrackFids( int tid )
|
|||||||
QString
|
QString
|
||||||
Tomahawk::DatabaseImpl::sortname( const QString& str, bool replaceArticle )
|
Tomahawk::DatabaseImpl::sortname( const QString& str, bool replaceArticle )
|
||||||
{
|
{
|
||||||
QString s = str.toLower().trimmed().replace( QRegExp( "[\\s]{2,}" ), " " );
|
QString s = str.simplified().toLower();
|
||||||
|
|
||||||
if ( replaceArticle && s.startsWith( "the " ) )
|
if ( replaceArticle && s.startsWith( "the " ) )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user