summaryrefslogtreecommitdiffstats
path: root/core/trip.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-09-14 19:26:34 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-21 16:12:23 -0700
commit067a481b781b09d4f672733550eba987981ea8b6 (patch)
tree0aa57f0046827155d2c6e379501779cef67143ec /core/trip.h
parent356293da7d8b457885beca77e48574dd9c73ad5c (diff)
downloadsubsurface-067a481b781b09d4f672733550eba987981ea8b6.tar.gz
Core: add unique id to trip
To make it easier to pass around trips through QML, give each trip a unique id. The id is generated in alloc_trip() and uses the same function to generate unique dive ids. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/trip.h')
-rw-r--r--core/trip.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/trip.h b/core/trip.h
index 2ca2791cd..51f371589 100644
--- a/core/trip.h
+++ b/core/trip.h
@@ -13,6 +13,7 @@ typedef struct dive_trip
char *location;
char *notes;
struct dive_table dives;
+ int id; /* unique ID for this trip: used to pass trips through QML. */
/* Used by the io-routines to mark trips that have already been written. */
bool saved;
bool autogen;