Replace less-or-equal by less-than comparison in lessThan function

DiveLocationFilterProxyModel::lessThan() used less-or-equal instead
of less-than comparison. This can lead to subtle bugs if two elements
compare as equal.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2017-12-28 10:53:26 +01:00 committed by Jan Mulder
parent c3b1c64183
commit c032006d91

View file

@ -358,7 +358,7 @@ bool DiveLocationFilterProxyModel::filterAcceptsRow(int source_row, const QModel
bool DiveLocationFilterProxyModel::lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const
{
return source_left.data().toString() <= source_right.data().toString();
return source_left.data().toString() < source_right.data().toString();
}