From e2d3a1255577bf7b333f823ce1ee123865b6c262 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 4 Jun 2024 19:03:44 +0200 Subject: [PATCH] cleanup: remove unused roles in DiveTripModelBase The roles DIVE_IDX and SELECTED_ROLE were used for the old selection system and removed in b8e7a600d2d2a30f7e0646fc164ab6e57fd4782f. Signed-off-by: Berthold Stoeger --- qt-models/divetripmodel.cpp | 4 ---- qt-models/divetripmodel.h | 2 -- 2 files changed, 6 deletions(-) diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 05353b7bf..12929b605 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -389,10 +389,6 @@ QVariant DiveTripModelBase::diveData(const struct dive *d, int column, int role) return d->rating; case DIVE_ROLE: return QVariant::fromValue(const_cast(d)); // Not nice: casting away a const - case DIVE_IDX: - return get_divenr(d); - case SELECTED_ROLE: - return d->selected; case CURRENT_ROLE: return d == current_dive; } diff --git a/qt-models/divetripmodel.h b/qt-models/divetripmodel.h index 63e4a5410..20184e8a3 100644 --- a/qt-models/divetripmodel.h +++ b/qt-models/divetripmodel.h @@ -53,8 +53,6 @@ public: IS_TRIP_ROLE, DIVE_ROLE, TRIP_ROLE, - DIVE_IDX, - SELECTED_ROLE, CURRENT_ROLE, TRIP_HAS_CURRENT_ROLE, // Returns true if this is a trip and it contains the current dive LAST_ROLE