From fdffa035ba261d374101d230c0a884725f34e362 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Fri, 9 Aug 2019 17:38:41 +0200 Subject: 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 --- src/printsupport/dialogs/qprintdialog_unix.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/printsupport') 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); -- cgit v1.2.3 From ce73b4db62574fc966192e6a4f65b7e2b2280e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 20 Aug 2019 14:26:05 +0200 Subject: Remove dead code from Qt 4 times MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The benefit of keeping this code around was to inspire or inform changes in the areas to take into account possibly missing features in Qt 5, but at this point that benefit is questionable. We can always use the history to learn about missing pieces if needed. Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025 Reviewed-by: Tor Arne Vestbø --- src/printsupport/dialogs/qpagesetupdialog.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/printsupport') diff --git a/src/printsupport/dialogs/qpagesetupdialog.cpp b/src/printsupport/dialogs/qpagesetupdialog.cpp index dc0457d20d..ce2a0416c8 100644 --- a/src/printsupport/dialogs/qpagesetupdialog.cpp +++ b/src/printsupport/dialogs/qpagesetupdialog.cpp @@ -114,10 +114,8 @@ void QPageSetupDialogPrivate::setPrinter(QPrinter *newPrinter) printer = new QPrinter; ownsPrinter = true; } -#if 1 // Used to be excluded in Qt4 for Q_WS_X11 if (printer->outputFormat() != QPrinter::NativeFormat) qWarning("QPageSetupDialog: Cannot be used on non-native printers"); -#endif } /*! -- cgit v1.2.3