News sorting fixes.
This commit is contained in:
parent
f0e86395c7
commit
b7d390da0e
@ -3,6 +3,7 @@
|
||||
|
||||
Fixed:
|
||||
<ul>
|
||||
<li>Messages are now sorted using active locale.</li>
|
||||
<li>Fixed bug #49 and duplicate feed/category detection.</li>
|
||||
<li>Experimentally fixed bug #50.</li>
|
||||
<li>NSIS installer is now portable. It makes only ONE access to registry and you can use it to install RSS Guard to any location such as USB flash drives.</li>
|
||||
|
@ -39,10 +39,13 @@ 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
|
||||
// than default implementation.
|
||||
return QSortFilterProxyModel::lessThan(left, right);
|
||||
if (left.column() == MSG_DB_TITLE_INDEX && right.column() == MSG_DB_TITLE_INDEX) {
|
||||
return QString::localeAwareCompare(m_sourceModel->data(left).toString(),
|
||||
m_sourceModel->data(right).toString()) < 0;
|
||||
}
|
||||
else {
|
||||
return QSortFilterProxyModel::lessThan(left, right);
|
||||
}
|
||||
}
|
||||
|
||||
QModelIndexList MessagesProxyModel::mapListFromSource(const QModelIndexList &indexes, bool deep) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user