Avoid warning from QPrinter::setFromTo() in the documented 0,0 case
The doc says the setFromTo(0, 0) will print the whole document, i.e. clear the page ranges. Although this works, it creates a runtime warning. Fixes: QTBUG-105292 Change-Id: Ic5de5be71ffc91762c8a4a44875ba133831d981f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 7988cf25a52d26109e60fe5a7b72ec2940c59ecc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
a68acbd0cf
commit
30ddd5874a
@ -1410,7 +1410,8 @@ int QPrinter::toPage() const
|
||||
void QPrinter::setFromTo(int from, int to)
|
||||
{
|
||||
d->pageRanges.clear();
|
||||
d->pageRanges.addRange(from, to);
|
||||
if (from && to)
|
||||
d->pageRanges.addRange(from, to);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
x
Reference in New Issue
Block a user