summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-06-16 16:05:17 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-17 17:06:19 +0000
commit5ea55bc1bc3eccf85c88756f2126b33d9e3e7a2d (patch)
tree1904a7788379290479c407c58a3e1a70d055ea15 /tests
parent020e6a22446556850b74153b88f2c6b8c01d8ab1 (diff)
macOS: set print dialog up with page attributes when no printer is installed
When the print dialog is opened without a printer installed, then the printer's output format is PDF rather than native. In this case, we need to set the NSPrintInfo with some page atttributes explicitly, and not default to the application-wide NSPrintInfo.sharedPrintInfo. Otherwise, the print dialog will show the wrong page size and orientation, and the printer will not have the previously set values when the dialog returns. The dialog always shows the wrong values for the page margins (only available through the presets dialog), but the printer's values are not overridden. Also, the print range is taken care of correctly by the code further down in this function, irrespective of the printer's output format. Note: this cannot be unit tested as we need to open the native print dialog on a system without printer installed, and compare the values we set on the printer before opening the dialog with the values after the dialog was successfully finished via PDF->Save as PDF. Fixes: QTBUG-100188 Change-Id: I8f1561e054f6a867b131111845c9b061778e4eb0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit b2fb14b7ba1db35eebf7621ead12909b35ec4042) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions