Locale aware sorting for feeds/categories.

This commit is contained in:
Martin Rotter 2014-01-18 20:38:51 +01:00
parent 1b99356a9b
commit d0c0234261
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -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);
}