From 85e3a4ad2902c5aabb5944f94961d0e1610bad26 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 30 May 2013 05:53:50 +0900 Subject: [PATCH] Fix sorting by rating In commit beb4ed38f264 ("Add a "sort role" for sorting the dive list") Linus forgot to add a case for the rating value. Now all columns sort correctly. With this I think we can close the bug... Fixes #111 Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 0d3c903a7..045592deb 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -837,6 +837,7 @@ QVariant DiveItem::data(int column, int role) const switch (column) { case NR: retVal = dive->number; break; case DATE: retVal = (qulonglong) dive->when; break; + case RATING: retVal = dive->rating; break; case DEPTH: retVal = dive->maxdepth.mm; break; case DURATION: retVal = dive->duration.seconds; break; case TEMPERATURE: retVal = dive->watertemp.mkelvin; break;