diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/templatelayout.cpp | 3 | ||||
-rw-r--r-- | desktop-widgets/templatelayout.h | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/desktop-widgets/templatelayout.cpp b/desktop-widgets/templatelayout.cpp index a376459a6..59768034e 100644 --- a/desktop-widgets/templatelayout.cpp +++ b/desktop-widgets/templatelayout.cpp @@ -69,7 +69,6 @@ QString TemplateLayout::generate() m_templateLoader->setTemplateDirs(QStringList() << getPrintingTemplatePathUser()); m_engine->addTemplateLoader(m_templateLoader); - Grantlee::registerMetaType<Dive>(); Grantlee::registerMetaType<template_options>(); Grantlee::registerMetaType<print_options>(); @@ -81,7 +80,7 @@ QString TemplateLayout::generate() //TODO check for exporting selected dives only if (!dive->selected && PrintOptions->print_selected) continue; - Dive d(dive); + DiveObjectHelper *d = new DiveObjectHelper(dive); diveList.append(QVariant::fromValue(d)); progress++; emit progressUpdated(progress * 100.0 / totalWork); diff --git a/desktop-widgets/templatelayout.h b/desktop-widgets/templatelayout.h index 1ef9b5834..6f4478a08 100644 --- a/desktop-widgets/templatelayout.h +++ b/desktop-widgets/templatelayout.h @@ -7,6 +7,7 @@ #include "statistics.h" #include "qthelper.h" #include "helpers.h" +#include "subsurface-core/subsurface-qt/DiveObjectHelper.h" int getTotalWork(print_options *printOptions); void find_all_templates(); @@ -44,7 +45,6 @@ public: ~YearInfo(); }; -Q_DECLARE_METATYPE(Dive) Q_DECLARE_METATYPE(template_options) Q_DECLARE_METATYPE(print_options) Q_DECLARE_METATYPE(YearInfo) @@ -59,7 +59,7 @@ Q_DECLARE_METATYPE(YearInfo) #define _RETURN_DIVE_PROPERTY_IDX(prop, idx) \ if (property == _CONC_STR(prop, idx)) return object.prop(idx) -GRANTLEE_BEGIN_LOOKUP(Dive) +GRANTLEE_BEGIN_LOOKUP(DiveObjectHelper) _RETURN_DIVE_PROPERTY(number); else _RETURN_DIVE_PROPERTY(id); else _RETURN_DIVE_PROPERTY(date); |