Use QString::localeAwareCompare instead of compare when sorting GS songs

This commit is contained in:
Arnaud Bienner 2012-05-17 01:56:11 +02:00
parent 2a661ec017
commit d2f5a7f811
2 changed files with 2 additions and 2 deletions

View File

@ -1530,7 +1530,7 @@ QVariantMap GroovesharkService::ExtractResult(QNetworkReply* reply) {
}
int CompareSongsName(const Song& song1, const Song& song2) {
return song1.PrettyTitleWithArtist().compare(song2.PrettyTitleWithArtist(), Qt::CaseInsensitive) < 0;
return song1.PrettyTitleWithArtist().localeAwareCompare(song2.PrettyTitleWithArtist()) < 0;
}
SongList GroovesharkService::ExtractSongs(const QVariantMap& result) {

View File

@ -138,7 +138,7 @@ class GroovesharkService : public InternetService {
: id_(id), name_(name), item_(item) {}
bool operator< (const PlaylistInfo other) const {
return name_.compare(other.name_, Qt::CaseInsensitive) < 0;
return name_.localeAwareCompare(other.name_) < 0;
}
int id_;