QPrintDialog - Fix Cups printer setup sequence

First set up the selected output format, printer and page size, and then
setup the selected job options.  This ensures all values are correctly
setup for the requested format and printer as not all settings may be
able to persist across the change in output format or printer.

Change-Id: I67f261f4e3be479a9018139633886ee8e570f42a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
John Layt 2013-12-07 20:17:52 +01:00 committed by The Qt Project
parent b0f83f2284
commit bd1a609aef

View File

@ -412,6 +412,10 @@ void QPrintDialogPrivate::applyPrinterProperties()
void QPrintDialogPrivate::setupPrinter()
{
// First setup the requested OutputFormat, Printer and Page Size first
top->d->setupPrinter();
// Then setup Print Job options
Q_Q(QPrintDialog);
QPrinter* p = q->printer();
@ -479,8 +483,6 @@ void QPrintDialogPrivate::setupPrinter()
// copies
p->setCopyCount(options.copies->value());
p->setCollateCopies(options.collate->isChecked());
top->d->setupPrinter();
}
void QPrintDialogPrivate::_q_togglePageSetCombo(bool checked)