summaryrefslogtreecommitdiffstats
path: root/core/dive.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-03-03 15:12:22 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commit82af1b2377cec03a989f86b8009d4ac226c6541e (patch)
treea875f194f7174c8673b2f7bd5cc43aa8ca3c51c6 /core/dive.h
parent37146c5742503becf75468fb07aab56011cb9101 (diff)
downloadsubsurface-82af1b2377cec03a989f86b8009d4ac226c6541e.tar.gz
Undo: make undo-system dive site-aware
As opposed to dive trips, dive sites were always directly added to the global table, even on import. Instead, parse the divesites into a distinct table and merge them on import. Currently, this does not do any merging of dive sites, i.e. dive sites are considered as either equal or different. Nevertheless, merging of data should be rather easy to implement and simply follow the code of the dive merging. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.h')
-rw-r--r--core/dive.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/dive.h b/core/dive.h
index d40e53043..03d6fc2df 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -758,15 +758,17 @@ extern void average_max_depth(struct diveplan *dive, int *avg_depth, int *max_de
#ifdef __cplusplus
}
-/* Make pointers to dive, dive_trip and dive_table "Qt metatypes" so that they can
- * be passed through QVariants and through QML.
+/* Make pointers to dive, dive_trip, dive_table, trip_table and dive_site_table
+ * "Qt metatypes" so that they can be passed through QVariants and through QML.
* Note: we have to use the typedef "dive_table_t" instead of "struct dive_table",
* because MOC removes the "struct", but dive_table is already the name of a global
- * variable, leading to compilation errors. Likewise for "struct trip_table". */
+ * variable, leading to compilation errors. Likewise for "struct trip_table" and
+ * "struct dive_site_table". */
Q_DECLARE_METATYPE(struct dive *);
Q_DECLARE_METATYPE(struct dive_trip *);
Q_DECLARE_METATYPE(dive_table_t *);
Q_DECLARE_METATYPE(trip_table_t *);
+Q_DECLARE_METATYPE(dive_site_table_t *);
#endif