From 64e6e435f82801f4f440ef5b1caf58a91a7c9929 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 11 Nov 2018 13:09:51 +0100 Subject: 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 --- core/subsurface-qt/DiveObjectHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/subsurface-qt/DiveObjectHelper.cpp') 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")); -- cgit v1.2.3-70-g09d2