Locale aware sorting for feeds/categories.
This commit is contained in:
parent
1b99356a9b
commit
d0c0234261
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user