mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
431b2bb845
commit
64e6e435f8
11 changed files with 23 additions and 52 deletions
|
|
@ -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"));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue