summaryrefslogtreecommitdiffstats
path: root/src/printsupport/dialogs
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2018-01-23 14:47:33 +0100
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2018-01-24 21:10:09 +0000
commitae3a65122f7ca21ed88bf1fbcd88e9dcfab0e4c7 (patch)
treee6ae065c401346f958f32e73e71430b36ae92bee /src/printsupport/dialogs
parentcb142954c54b7a6e391950d9209b5cea9252092b (diff)
cups: Clear cups options at the start of QPrintPropertiesDialog::setupPrinter
For some reason the cups options are kept globally instead of per printer at QCupsPrintEnginePrivate so when setting the printer options on accepting the print dialog, we first need to clear them and then call the other functions that set them, otherwise, we will "reuse" cups option set on the previous print. How to reproduce: * Open print dialog, set some advanced option to a non default value, easiest one is print in grayscale * Print * Check it prints in grayscale * Open print dialog, check the advanced options are all on default values * Print * Check it incorrectly prints in grayscale Change-Id: I59aacaf30db844ad40887d6b771f9354557852b6 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/printsupport/dialogs')
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index 2cc5bfbb8c..caab7867dc 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -403,6 +403,10 @@ QPrintPropertiesDialog::~QPrintPropertiesDialog()
void QPrintPropertiesDialog::setupPrinter() const
{
+#if QT_CONFIG(cups)
+ QCUPSSupport::clearCupsOptions(m_printer);
+#endif
+
widget.pageSetup->setupPrinter();
#if QT_CONFIG(cupsjobwidget)
m_jobOptions->setupPrinter();