Use edit role for title comparisons.
This commit is contained in:
parent
58846e474e
commit
4b6c91dd03
1 changed files with 2 additions and 2 deletions
|
@ -71,8 +71,8 @@ QModelIndex MessagesProxyModel::getNextUnreadItemIndex(int default_row, int max_
|
|||
|
||||
bool MessagesProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const {
|
||||
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;
|
||||
return QString::localeAwareCompare(m_sourceModel->data(left, Qt::EditRole).toString(),
|
||||
m_sourceModel->data(right, Qt::EditRole).toString()) < 0;
|
||||
}
|
||||
else {
|
||||
return QSortFilterProxyModel::lessThan(left, right);
|
||||
|
|
Loading…
Add table
Reference in a new issue