From c22fd9f4fd6699333629b8acb1e9c135a9783082 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 4 Mar 2019 23:20:29 +0100 Subject: Dive sites: prepare for dive site ref-counting Add a dive site table to each dive site to keep track of dives that have been added to a dive site. Add two functions to add dives to / remove dives from dive sites. Since dive sites now contain a dive table, the order of includes had to be changed: "divesite.h" now includes "dive.h" and not vice-versa. This caused some include churn. Signed-off-by: Berthold Stoeger --- qt-models/diveimportedmodel.h | 2 +- qt-models/divelocationmodel.cpp | 1 + qt-models/filtermodels.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'qt-models') diff --git a/qt-models/diveimportedmodel.h b/qt-models/diveimportedmodel.h index 8b0038478..532f5b899 100644 --- a/qt-models/diveimportedmodel.h +++ b/qt-models/diveimportedmodel.h @@ -3,7 +3,7 @@ #include #include -#include "core/dive.h" +#include "core/divesite.h" class DiveImportedModel : public QAbstractTableModel { diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index 552c7c276..2ce2e0a3e 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -2,6 +2,7 @@ #include "core/units.h" #include "qt-models/divelocationmodel.h" #include "core/qthelper.h" +#include "core/divesite.h" #include #include #include diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp index a5ba07204..5fd9ed1f7 100644 --- a/qt-models/filtermodels.cpp +++ b/qt-models/filtermodels.cpp @@ -3,6 +3,7 @@ #include "qt-models/models.h" #include "core/display.h" #include "core/qthelper.h" +#include "core/divesite.h" #include "core/subsurface-string.h" #include "core/subsurface-qt/DiveListNotifier.h" #include "qt-models/divetripmodel.h" -- cgit v1.2.3-70-g09d2