From d2f5a7f811f26044ea715bd7de7373e5e24b2973 Mon Sep 17 00:00:00 2001 From: Arnaud Bienner Date: Thu, 17 May 2012 01:56:11 +0200 Subject: [PATCH] Use QString::localeAwareCompare instead of compare when sorting GS songs --- src/internet/groovesharkservice.cpp | 2 +- src/internet/groovesharkservice.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internet/groovesharkservice.cpp b/src/internet/groovesharkservice.cpp index 7a1d4cd2c..0ec34c221 100644 --- a/src/internet/groovesharkservice.cpp +++ b/src/internet/groovesharkservice.cpp @@ -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) { diff --git a/src/internet/groovesharkservice.h b/src/internet/groovesharkservice.h index ad4a570f9..db6e08580 100644 --- a/src/internet/groovesharkservice.h +++ b/src/internet/groovesharkservice.h @@ -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_;