mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
b2b328fd7e
commit
449dec8269
2 changed files with 6 additions and 16 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue