summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2019-08-09 17:38:41 +0200
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2019-08-13 15:34:37 +0200
commitfdffa035ba261d374101d230c0a884725f34e362 (patch)
treebe0a7c1394fa433255a8acdbce695460e2d99dc8 /src
parent3d29f2198fdb7e710767b6711edf96f412d9bfac (diff)
Unix: Disable complex page ranges widget when printing to pdf
It doesn't work since it relies on cups to do the heavy lifting and cups is not used when printing to PDF Task-number: QTBUG-77351 Change-Id: I1bdda58b50112b9bb3d7991f3cfd860d6b4f4fc4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index 9fb9d6c55e..d2937e7547 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -727,6 +727,11 @@ void QPrintDialogPrivate::selectPrinter(const QPrinter::OutputFormat outputForma
else
options.pageSetCombo->setEnabled(true);
+ // Disable complex page ranges widget when printing to pdf
+ // It doesn't work since it relies on cups to do the heavy lifting and cups
+ // is not used when printing to PDF
+ options.pagesRadioButton->setEnabled(outputFormat != QPrinter::PdfFormat);
+
#if QT_CONFIG(cups)
// Disable color options on main dialog if not printing to file, it will be handled by CUPS advanced dialog
options.colorMode->setVisible(outputFormat == QPrinter::PdfFormat);