News sorting fixes.
This commit is contained in:
parent
f0e86395c7
commit
b7d390da0e
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
Fixed:
|
Fixed:
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>Messages are now sorted using active locale.</li>
|
||||||
<li>Fixed bug #49 and duplicate feed/category detection.</li>
|
<li>Fixed bug #49 and duplicate feed/category detection.</li>
|
||||||
<li>Experimentally fixed bug #50.</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>
|
<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,11 +39,14 @@ MessagesProxyModel::~MessagesProxyModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool MessagesProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const {
|
bool MessagesProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const {
|
||||||
// TODO: Maybe use QString::localeAwareCompare() here for
|
if (left.column() == MSG_DB_TITLE_INDEX && right.column() == MSG_DB_TITLE_INDEX) {
|
||||||
// title at least, but this will be probably little slower
|
return QString::localeAwareCompare(m_sourceModel->data(left).toString(),
|
||||||
// than default implementation.
|
m_sourceModel->data(right).toString()) < 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
return QSortFilterProxyModel::lessThan(left, right);
|
return QSortFilterProxyModel::lessThan(left, right);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QModelIndexList MessagesProxyModel::mapListFromSource(const QModelIndexList &indexes, bool deep) {
|
QModelIndexList MessagesProxyModel::mapListFromSource(const QModelIndexList &indexes, bool deep) {
|
||||||
QModelIndexList mapped_indexes;
|
QModelIndexList mapped_indexes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user