Also, the fix for
QTBUG-6471 introduces new bugs.
If I give a QPrinter configured for QPrinter::A6 to QPrintDialog, then choosing "Print to PDF" will output an A4 document. Bug!
However if, in the print dialog, the user opens the "Properties" dialog – and doesn't do anything else, just presses OK – then the PDF will use A6 paper size as intended!
My debugging shows that the setPaperSize(A4) comes from the code added for
QTBUG-6471, i.e. the "CUPS" size overwrites the user-chosen size. [A6 is chosen by the user initially in a preview dialog, before QPrintDialog is shown]
Qt-4.6.4 & Qt-4.7.2, linux X11.