1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-05 00:22:31 +02:00

Merge pull request #303 from theli-ua/casesense

Use QString.compare method for case insensitive comparison
This commit is contained in:
Christian Muehlhaeuser 2015-05-26 08:33:48 +02:00
commit dd9609e8fc

View File

@ -179,7 +179,7 @@ MusicBrainzPlugin::gotReleaseGroupsSlot()
QString groupTitle = releaseGroupsNL.at(i).firstChildElement("title").text();
QString a = releaseGroupsNL.at(i).firstChildElement( "artist-credit" ).firstChildElement( "name-credit" ).firstChildElement( "artist" ).firstChildElement( "name" ).text();
QString id = releaseGroupsNL.at(i).firstChildElement( "artist-credit" ).firstChildElement( "name-credit" ).firstChildElement( "artist" ).attribute( "id" );
if ( !albums.contains( groupTitle ) && id == popularId && a.normalized( QString::NormalizationForm_KC ).toCaseFolded() == hash["artist"].normalized( QString::NormalizationForm_KC ).toCaseFolded() )
if ( !albums.contains( groupTitle ) && id == popularId && a.normalized( QString::NormalizationForm_KC ).compare(hash["artist"].normalized( QString::NormalizationForm_KC ), Qt::CaseInsensitive) == 0 )
{
albums << groupTitle;
tDebug() << Q_FUNC_INFO << groupTitle;