aboutsummaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/DiveObjectHelper.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-11-11 13:09:51 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-11-18 16:50:09 -0800
commit64e6e435f82801f4f440ef5b1caf58a91a7c9929 (patch)
tree0f2c662daab035463de05c1564af7026c7edbd7e /core/subsurface-qt/DiveObjectHelper.cpp
parent431b2bb84542d4f45952b48aa91231f979762e00 (diff)
downloadsubsurface-64e6e435f82801f4f440ef5b1caf58a91a7c9929.tar.gz
Core: remove "when" field of struct dive_trip
The when field gives the time of the first dive. Instead of keeping this field in sync, replace it by a function that determines the time of the first dive. 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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp
index b254ed13f..3a9216d63 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -343,7 +343,7 @@ QString DiveObjectHelper::tripMeta() const
if (dt) {
QString numDives = tr("(%n dive(s))", "", dt->showndives);
QString title(dt->location);
- QDateTime firstTime = QDateTime::fromMSecsSinceEpoch(1000*dt->when, Qt::UTC);
+ QDateTime firstTime = QDateTime::fromMSecsSinceEpoch(1000*trip_date(dt), Qt::UTC);
QString firstMonth = firstTime.toString("MMM");
QString tripDate = QStringLiteral("%1@%2").arg(firstMonth,firstTime.toString("yy"));