aboutsummaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/DiveObjectHelper.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-11-08 16:58:33 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-11-18 16:50:09 -0800
commit6b283e598a3a08c6133d66b5d5617370296e7d0e (patch)
tree685ccf1fd839d72471b179bf12aa72d2bdcec7de /core/subsurface-qt/DiveObjectHelper.cpp
parentbc7afebc23477ef23f2b9741bf45b2180cbafe15 (diff)
downloadsubsurface-6b283e598a3a08c6133d66b5d5617370296e7d0e.tar.gz
Dive list: replace dive-list of trips by a table
The dives of each trip were kept in a list. Replace this by a struct dive_table. This will make it significantly easier to keep the dives of a trip in sorted state. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r--core/subsurface-qt/DiveObjectHelper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp
index 41d4cebd9..b254ed13f 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -350,7 +350,7 @@ QString DiveObjectHelper::tripMeta() const
if (title.isEmpty()) {
// so use the date range
QString firstYear = firstTime.toString("yyyy");
- QDateTime lastTime = QDateTime::fromMSecsSinceEpoch(1000*dt->dives->when, Qt::UTC);
+ QDateTime lastTime = QDateTime::fromMSecsSinceEpoch(1000*dt->dives.dives[0]->when, Qt::UTC);
QString lastMonth = lastTime.toString("MMM");
QString lastYear = lastTime.toString("yyyy");
if (lastMonth == firstMonth && lastYear == firstYear)
@@ -368,7 +368,7 @@ QString DiveObjectHelper::tripMeta() const
int DiveObjectHelper::tripNrDives() const
{
struct dive_trip *dt = m_dive->divetrip;
- return dt ? dt->nrdives : 0;
+ return dt ? dt->dives.nr : 0;
}
int DiveObjectHelper::maxcns() const