QPagedPaintDevice::setMargins() is virtual method and reimplemented in
QPrinter but super class margins were not set in reimplemented method.
This fixes problem where QTextDocument::print() checked the margins
using QPagedPaintDevice::margins() and overrided the margins set
in QPrinter::setMargins().
Change-Id: I3bdcc33b8f6b5a9cbcb04a21484fdd1612dd7d58
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
+ // set margins also to super class
+ QPagedPaintDevice::setMargins(m);
+
const qreal multiplier = 72./25.4;
QList<QVariant> margins;
margins << (m.left * multiplier) << (m.top * multiplier)
const qreal multiplier = 72./25.4;
QList<QVariant> margins;
margins << (m.left * multiplier) << (m.top * multiplier)