From 25aa80846b84c0b3cd3e0b0256a046e1e92fb1db Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 7 Jan 2016 16:01:24 -0200 Subject: Move Dive class from qthelper.h/cpp to it's own file and rename it to DiveObjectHelper, since it should be an QObject based class to make it easier on the QML, grantlee and widgets side to display the dive's internal data. each Q_PROPERTY defined in the DiveObjectHelper.h file can be acessed directly via it's name. So, if you are on a model that returns a dive, acess it's name by dive.name Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- desktop-widgets/templatelayout.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'desktop-widgets/templatelayout.cpp') 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(); Grantlee::registerMetaType(); Grantlee::registerMetaType(); @@ -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); -- cgit v1.2.3-70-g09d2