From 7f4d9db962e73aa5d5089c43c99b78b3690ffb87 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 31 May 2019 16:09:14 +0200 Subject: Cleanup: move trip-related functions into own translation unit These functions were spread out over dive.c and divelist.c. Move them into their own file to make all this a bit less monolithic. Signed-off-by: Berthold Stoeger --- desktop-widgets/tab-widgets/TabDiveInformation.cpp | 1 + desktop-widgets/tab-widgets/maintab.cpp | 1 + desktop-widgets/tab-widgets/maintab.h | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'desktop-widgets/tab-widgets') diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.cpp b/desktop-widgets/tab-widgets/TabDiveInformation.cpp index d55cb48b6..ee56fde67 100644 --- a/desktop-widgets/tab-widgets/TabDiveInformation.cpp +++ b/desktop-widgets/tab-widgets/TabDiveInformation.cpp @@ -5,6 +5,7 @@ #include "core/units.h" #include "core/dive.h" #include "desktop-widgets/command.h" +#include "core/trip.h" // TODO: Needed because divesChanged uses a trip parameter -> remove that! #include #include diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index ad39c433e..e263874da 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -10,6 +10,7 @@ #include "desktop-widgets/mapwidget.h" #include "core/qthelper.h" #include "core/statistics.h" +#include "core/trip.h" #include "qt-models/diveplannermodel.h" #include "desktop-widgets/divelistview.h" #include "core/display.h" diff --git a/desktop-widgets/tab-widgets/maintab.h b/desktop-widgets/tab-widgets/maintab.h index 70cabf343..5968c7d31 100644 --- a/desktop-widgets/tab-widgets/maintab.h +++ b/desktop-widgets/tab-widgets/maintab.h @@ -91,7 +91,7 @@ private: bool lastSelectedDive; int lastTabSelectedDive; int lastTabSelectedDiveTrip; - dive_trip_t *currentTrip; + dive_trip *currentTrip; QList extraWidgets; void divesEdited(int num); // Opens a warning window if more than one dive was edited }; -- cgit v1.2.3-70-g09d2