summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/templatelayout.cpp18
-rw-r--r--desktop-widgets/templatelayout.h4
2 files changed, 11 insertions, 11 deletions
diff --git a/desktop-widgets/templatelayout.cpp b/desktop-widgets/templatelayout.cpp
index 21eac0c92..27afbac65 100644
--- a/desktop-widgets/templatelayout.cpp
+++ b/desktop-widgets/templatelayout.cpp
@@ -92,9 +92,9 @@ void copy_bundled_templates(QString src, QString dst, QStringList *templateBacku
}
}
-TemplateLayout::TemplateLayout(print_options *PrintOptions, template_options *templateOptions)
+TemplateLayout::TemplateLayout(print_options *printOptions, template_options *templateOptions)
{
- this->PrintOptions = PrintOptions;
+ this->printOptions = printOptions;
this->templateOptions = templateOptions;
}
@@ -134,7 +134,7 @@ static QString preprocessTemplate(const QString &in)
QString TemplateLayout::generate()
{
int progress = 0;
- int totalWork = getTotalWork(PrintOptions);
+ int totalWork = getTotalWork(printOptions);
QString htmlContent;
Grantlee::Engine engine(this);
@@ -152,7 +152,7 @@ QString TemplateLayout::generate()
int i;
for_each_dive (i, dive) {
//TODO check for exporting selected dives only
- if (!dive->selected && PrintOptions->print_selected)
+ if (!dive->selected && printOptions->print_selected)
continue;
DiveObjectHelper *d = new DiveObjectHelper(dive);
diveList.append(QVariant::fromValue(d));
@@ -163,14 +163,14 @@ QString TemplateLayout::generate()
Grantlee::Context c;
c.insert("dives", diveList);
c.insert("template_options", QVariant::fromValue(*templateOptions));
- c.insert("print_options", QVariant::fromValue(*PrintOptions));
+ c.insert("print_options", QVariant::fromValue(*printOptions));
/* don't use the Grantlee loader API */
- QString templateContents = readTemplate(PrintOptions->p_template);
+ QString templateContents = readTemplate(printOptions->p_template);
QString preprocessed = preprocessTemplate(templateContents);
/* create the template from QString; is this thing allocating memory? */
- Grantlee::Template t = engine.newTemplate(preprocessed, PrintOptions->p_template);
+ Grantlee::Template t = engine.newTemplate(preprocessed, printOptions->p_template);
if (!t || t->error()) {
qDebug() << "Can't load template";
return htmlContent;
@@ -212,9 +212,9 @@ QString TemplateLayout::generateStatistics()
Grantlee::Context c;
c.insert("years", years);
c.insert("template_options", QVariant::fromValue(*templateOptions));
- c.insert("print_options", QVariant::fromValue(*PrintOptions));
+ c.insert("print_options", QVariant::fromValue(*printOptions));
- Grantlee::Template t = engine.loadByName(PrintOptions->p_template);
+ Grantlee::Template t = engine.loadByName(printOptions->p_template);
if (!t || t->error()) {
qDebug() << "Can't load template";
return htmlContent;
diff --git a/desktop-widgets/templatelayout.h b/desktop-widgets/templatelayout.h
index da3dc177c..5fab95f44 100644
--- a/desktop-widgets/templatelayout.h
+++ b/desktop-widgets/templatelayout.h
@@ -20,14 +20,14 @@ extern QList<QString> grantlee_templates, grantlee_statistics_templates;
class TemplateLayout : public QObject {
Q_OBJECT
public:
- TemplateLayout(print_options *PrintOptions, template_options *templateOptions);
+ TemplateLayout(print_options *printOptions, template_options *templateOptions);
QString generate();
QString generateStatistics();
static QString readTemplate(QString template_name);
static void writeTemplate(QString template_name, QString grantlee_template);
private:
- print_options *PrintOptions;
+ print_options *printOptions;
template_options *templateOptions;
signals: