mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: remove Printer::dpi member variable
This variable is not used outside a single function, where it is reset every time the function runs. This can be realized by a function-local variable just as well. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7944978274
commit
cfc87e9da3
2 changed files with 2 additions and 4 deletions
|
@ -21,8 +21,7 @@ Printer::Printer(QPaintDevice *paintDevice, const print_options &printOptions, c
|
||||||
templateOptions(templateOptions),
|
templateOptions(templateOptions),
|
||||||
printMode(printMode),
|
printMode(printMode),
|
||||||
inPlanner(inPlanner),
|
inPlanner(inPlanner),
|
||||||
done(0),
|
done(0)
|
||||||
dpi(0)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +226,7 @@ void Printer::print()
|
||||||
|
|
||||||
TemplateLayout t(printOptions, templateOptions);
|
TemplateLayout t(printOptions, templateOptions);
|
||||||
connect(&t, SIGNAL(progressUpdated(int)), this, SLOT(templateProgessUpdated(int)));
|
connect(&t, SIGNAL(progressUpdated(int)), this, SLOT(templateProgessUpdated(int)));
|
||||||
dpi = printerPtr->resolution();
|
int dpi = printerPtr->resolution();
|
||||||
//rendering resolution = selected paper size in inchs * printer dpi
|
//rendering resolution = selected paper size in inchs * printer dpi
|
||||||
pageSize.setHeight(qCeil(printerPtr->pageRect(QPrinter::Inch).height() * dpi));
|
pageSize.setHeight(qCeil(printerPtr->pageRect(QPrinter::Inch).height() * dpi));
|
||||||
pageSize.setWidth(qCeil(printerPtr->pageRect(QPrinter::Inch).width() * dpi));
|
pageSize.setWidth(qCeil(printerPtr->pageRect(QPrinter::Inch).width() * dpi));
|
||||||
|
|
|
@ -29,7 +29,6 @@ private:
|
||||||
PrintMode printMode;
|
PrintMode printMode;
|
||||||
bool inPlanner;
|
bool inPlanner;
|
||||||
int done;
|
int done;
|
||||||
int dpi;
|
|
||||||
void render(int Pages);
|
void render(int Pages);
|
||||||
void flowRender();
|
void flowRender();
|
||||||
void putProfileImage(const QRect &box, const QRect &viewPort, QPainter *painter,
|
void putProfileImage(const QRect &box, const QRect &viewPort, QPainter *painter,
|
||||||
|
|
Loading…
Add table
Reference in a new issue