Fix inverted alphabetical device sorting order

QSortFilterProxyModel attempted to sort in ascending order but due to this
issue, it instead ended up sorting in descending order.
This commit is contained in:
Mavroudis Chatzilazaridis 2024-05-20 00:20:37 +03:00 committed by Albert Vaca Cintora
parent 88ba2acad9
commit a9a3661cf3

View file

@ -34,7 +34,7 @@ bool DevicesSortProxyModel::lessThan(const QModelIndex &left, const QModelIndex
QString nameLeft = model->data(left, DevicesModel::NameModelRole).toString(); QString nameLeft = model->data(left, DevicesModel::NameModelRole).toString();
QString nameRight = model->data(right, DevicesModel::NameModelRole).toString(); QString nameRight = model->data(right, DevicesModel::NameModelRole).toString();
return nameLeft > nameRight; return nameLeft < nameRight;
} }
bool DevicesSortProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const bool DevicesSortProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const