From d9942269a9b61bc35bd939b23858a7cb4a2515c3 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 14 Dec 2020 23:21:58 +0100 Subject: printing: remove DiveObjectHelperGrantlee This was a weird helper object, needed for grantlee. Instead of storing this object, loop over cylinders and dives directly. The actual accessor function is unchanged and now generates a DiveObjectHelper or DiveCylinderHelper for every variable access. Obviously, this is very inefficient. However, this will be replaced in future commits by direct calls to formatting functions. Signed-off-by: Berthold Stoeger --- desktop-widgets/templatelayout.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'desktop-widgets/templatelayout.h') diff --git a/desktop-widgets/templatelayout.h b/desktop-widgets/templatelayout.h index c7e3537aa..786cd055a 100644 --- a/desktop-widgets/templatelayout.h +++ b/desktop-widgets/templatelayout.h @@ -3,9 +3,9 @@ #define TEMPLATELAYOUT_H #include "core/statistics.h" +#include "core/equipment.h" #include -class DiveObjectHelperGrantlee; class CylinderObjectHelper; struct print_options; struct template_options; @@ -36,14 +36,14 @@ public: private: struct State { - QList dives; + QList dives; QList years; QMap types; int forloopiterator = -1; - const DiveObjectHelperGrantlee *currentDive = nullptr; + const dive * const *currentDive = nullptr; const stats_t * const *currentYear = nullptr; const QString *currentCylinder = nullptr; - const CylinderObjectHelper *currentCylinderObject = nullptr; + const cylinder_t * const *currentCylinderObject = nullptr; }; const print_options &printOptions; const template_options &templateOptions; -- cgit v1.2.3-70-g09d2