From 574757301986ecd2a3c8c9c0150a7d27524731e2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 20 Mar 2020 15:31:46 -0700 Subject: mobile/models: make dive invalid flag available to mobile UI Signed-off-by: Dirk Hohndel --- qt-models/divetripmodel.cpp | 1 + qt-models/mobilelistmodel.cpp | 1 + qt-models/mobilelistmodel.h | 1 + 3 files changed, 3 insertions(+) (limited to 'qt-models') diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 23eda0c51..bcca977b5 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -244,6 +244,7 @@ QVariant DiveTripModelBase::diveData(const struct dive *d, int column, int role) case MobileListModel::FirstGasRole: return getFirstGas(d); case MobileListModel::SelectedRole: return d->selected; case MobileListModel::DiveInTripRole: return d->divetrip != NULL; + case MobileListModel::IsInvalidRole: return d->invalid; } #endif switch (role) { diff --git a/qt-models/mobilelistmodel.cpp b/qt-models/mobilelistmodel.cpp index 43b805833..6dd74a57c 100644 --- a/qt-models/mobilelistmodel.cpp +++ b/qt-models/mobilelistmodel.cpp @@ -51,6 +51,7 @@ QHash MobileListModelBase::roleNames() const roles[TripBelow] = "tripBelow"; roles[TripLocationRole] = "tripLocation"; roles[TripNotesRole] = "tripNotes"; + roles[IsInvalidRole] = "isInvalid"; return roles; } diff --git a/qt-models/mobilelistmodel.h b/qt-models/mobilelistmodel.h index 23ed83028..c898ed118 100644 --- a/qt-models/mobilelistmodel.h +++ b/qt-models/mobilelistmodel.h @@ -59,6 +59,7 @@ public: TripBelow, TripLocationRole, TripNotesRole, + IsInvalidRole }; QHash roleNames() const override; protected: -- cgit v1.2.3-70-g09d2