From c032006d91ee3cce7d9267ff9a1c39ac7087d272 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 28 Dec 2017 10:53:26 +0100 Subject: 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 --- desktop-widgets/locationinformation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index 5212b0bf9..f10b2b766 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -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(); } -- cgit v1.2.3-70-g09d2