Mobile: move tripId from DiveObjectHelper to DiveListModel

The canonical way of displaying lists in Qt is via models.
Thus, return the tripId directly from the DiveListModel instead
of going indirectly via a DiveObjectHelper. In the future, this
will allow us to make the DiveObjectHelper value-based, as it
is not generated numerous times for every list item.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-08-14 23:53:28 +02:00 committed by bstoeger
parent b7cddcc737
commit 1b9581369a
5 changed files with 8 additions and 11 deletions

View file

@ -38,6 +38,7 @@ public:
enum DiveListRoles {
DiveRole = Qt::UserRole + 1,
DiveDateRole,
TripIdRole,
};
static DiveListModel *instance();