summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/templatelayout.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-04-26 17:46:02 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-29 13:03:31 -0700
commit449dec82694aa1bc7fd1de56792ec7a0cf865bd0 (patch)
treec128f3b744219b3974748580606637c35ce7c21e /desktop-widgets/templatelayout.h
parentb2b328fd7e6528a968247f53b716c22cc48c44d0 (diff)
downloadsubsurface-449dec82694aa1bc7fd1de56792ec7a0cf865bd0.tar.gz
Cleanup: remove TemplateLayout::m_engine member variable
TemplateLayout::m_engine is a Grantlee::Engine that is reallocated for every function call. Instead of the archaic memory-management, remove the member variable and make it a local variable of the two functions that need it. There seems to be no point in keeping the object alive beyond the function's scope. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/templatelayout.h')
-rw-r--r--desktop-widgets/templatelayout.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/desktop-widgets/templatelayout.h b/desktop-widgets/templatelayout.h
index 3b574c0db..da3dc177c 100644
--- a/desktop-widgets/templatelayout.h
+++ b/desktop-widgets/templatelayout.h
@@ -21,14 +21,12 @@ class TemplateLayout : public QObject {
Q_OBJECT
public:
TemplateLayout(print_options *PrintOptions, template_options *templateOptions);
- ~TemplateLayout();
QString generate();
QString generateStatistics();
static QString readTemplate(QString template_name);
static void writeTemplate(QString template_name, QString grantlee_template);
private:
- Grantlee::Engine *m_engine;
print_options *PrintOptions;
template_options *templateOptions;