summaryrefslogtreecommitdiffstats
path: root/qt-models/divelistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/divelistmodel.cpp')
-rw-r--r--qt-models/divelistmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp
index caa31dcae..15934f9d6 100644
--- a/qt-models/divelistmodel.cpp
+++ b/qt-models/divelistmodel.cpp
@@ -245,6 +245,7 @@ QVariant DiveListModel::data(const QModelIndex &index, int role) const
case DiveRole: return QVariant::fromValue<QObject*>(curr_dive);
case DiveDateRole: return (qlonglong)curr_dive->timestamp();
case TripIdRole: return d->divetrip ? QString::number((quint64)d->divetrip, 16) : QString();
+ case TripNrDivesRole: return d->divetrip ? d->divetrip->dives.nr : 0;
}
return QVariant();
@@ -256,6 +257,7 @@ QHash<int, QByteArray> DiveListModel::roleNames() const
roles[DiveRole] = "dive";
roles[DiveDateRole] = "date";
roles[TripIdRole] = "tripId";
+ roles[TripNrDivesRole] = "tripNrDives";
return roles;
}