summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--printer.cpp7
-rw-r--r--printer.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/printer.cpp b/printer.cpp
index f8a90f96d..446a5c29d 100644
--- a/printer.cpp
+++ b/printer.cpp
@@ -13,6 +13,12 @@ Printer::Printer(QPrinter *printer, print_options *printOptions, template_option
this->templateOptions = templateOptions;
dpi = 0;
done = 0;
+ webView = new QWebView();
+}
+
+Printer::~Printer()
+{
+ delete webView;
}
void Printer::putProfileImage(QRect profilePlaceholder, QRect viewPort, QPainter *painter, struct dive *dive, QPointer<ProfileWidget2> profile)
@@ -118,7 +124,6 @@ void Printer::templateProgessUpdated(int value)
void Printer::print()
{
TemplateLayout t(printOptions, templateOptions);
- webView = new QWebView();
connect(&t, SIGNAL(progressUpdated(int)), this, SLOT(templateProgessUpdated(int)));
dpi = printer->resolution();
diff --git a/printer.h b/printer.h
index 4ab65834a..73368a669 100644
--- a/printer.h
+++ b/printer.h
@@ -29,6 +29,7 @@ private slots:
public:
Printer(QPrinter *printer, print_options *printOptions, template_options *templateOptions);
+ ~Printer();
void print();
signals: