1
0
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:
Uwe L. Korn
2014-07-16 09:21:32 +01:00
parent 351a7596a7
commit 4e07c96ecd

View File

@@ -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 " ) )
{ {