From d0c0234261fcd198864744b27dcabdc26e419c45 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Sat, 18 Jan 2014 20:38:51 +0100 Subject: [PATCH] Locale aware sorting for feeds/categories. --- src/core/feedsproxymodel.cpp | 5 ++--- src/core/messagesproxymodel.cpp | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/feedsproxymodel.cpp b/src/core/feedsproxymodel.cpp index b47af4202..68b8a412e 100755 --- a/src/core/feedsproxymodel.cpp +++ b/src/core/feedsproxymodel.cpp @@ -48,9 +48,8 @@ bool FeedsProxyModel::lessThan(const QModelIndex &left, } else { // In other cases, sort by title. - // TODO: mozna pouzit QString::localeAwareCompare tady. - return QString::compare(left_item->title(), - right_item->title()) < 0; + return QString::localeAwareCompare(left_item->title(), + right_item->title()) < 0; } } else if (left_item->kind() == FeedsModelRootItem::Feed) { diff --git a/src/core/messagesproxymodel.cpp b/src/core/messagesproxymodel.cpp index a4071ece3..5ac8f7032 100644 --- a/src/core/messagesproxymodel.cpp +++ b/src/core/messagesproxymodel.cpp @@ -25,7 +25,8 @@ MessagesProxyModel::~MessagesProxyModel() { bool MessagesProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const { // TODO: Maybe use QString::localeAwareCompare() here for - // title at least, but this will be probably little slower. + // title at least, but this will be probably little slower + // than default implementation. return QSortFilterProxyModel::lessThan(left, right); }