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 Pick-to: 6.4 Change-Id: Ic5de5be71ffc91762c8a4a44875ba133831d981f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
0709af1c02
commit
7988cf25a5
@ -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…
Reference in New Issue
Block a user