summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-models/divetripmodel.cpp1
-rw-r--r--qt-models/mobilelistmodel.cpp1
-rw-r--r--qt-models/mobilelistmodel.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp
index a9fd3490b..7c6655ba8 100644
--- a/qt-models/divetripmodel.cpp
+++ b/qt-models/divetripmodel.cpp
@@ -229,6 +229,7 @@ QVariant DiveTripModelBase::diveData(const struct dive *d, int column, int role)
case MobileListModel::EndPressureRole: return getEndPressure(d);
case MobileListModel::FirstGasRole: return getFirstGas(d);
case MobileListModel::SelectedRole: return d->selected;
+ case MobileListModel::DiveInTripRole: return d->divetrip != NULL;
}
#endif
switch (role) {
diff --git a/qt-models/mobilelistmodel.cpp b/qt-models/mobilelistmodel.cpp
index 744cda195..75753b12a 100644
--- a/qt-models/mobilelistmodel.cpp
+++ b/qt-models/mobilelistmodel.cpp
@@ -46,6 +46,7 @@ QHash<int, QByteArray> MobileListModelBase::roleNames() const
roles[EndPressureRole] = "endPressure";
roles[FirstGasRole] = "firstGas";
roles[SelectedRole] = "selected";
+ roles[DiveInTripRole] = "diveInTrip";
return roles;
}
diff --git a/qt-models/mobilelistmodel.h b/qt-models/mobilelistmodel.h
index 2ec8cbd8c..572a3b146 100644
--- a/qt-models/mobilelistmodel.h
+++ b/qt-models/mobilelistmodel.h
@@ -54,6 +54,7 @@ public:
EndPressureRole,
FirstGasRole,
SelectedRole,
+ DiveInTripRole,
};
QHash<int, QByteArray> roleNames() const override;
protected: