forked from pool/libqt5-qtbase
69da80a0af
- Add 0001-Fix-custom-page-size-handling-in-the-Unix-print-dial.patch to fix custom page size handling in the Unix print dialog (QTBUG-58733) - Add patches from upstream to reintroduce the advanced tab in the Qt printer properties dialog: 0001-Remove-QPrintDialogPrivate-applyPrinterProperties-no.patch 0002-Remove-QUnixPrintWidgetPrivate-applyPrinterPropertie.patch 0003-Remove-QPrintPropertiesDialog-applyPrinterProperties.patch 0004-Remove-QCupsJobWidget-setPrinter.patch 0005-Remove-QPrintPropertiesDialog-selectPrinter.patch 0006-Remove-QPageSetupWidget-selectPrinter.patch 0007-Introduce-QPrintDevice-property-setProperty.patch 0008-Allow-access-to-ppd-file-and-ppdMarkOption-via-QPpdP.patch 0009-QPlatformPrintDevice-use-QVector-not-QList-in-the-AP.patch 0010-Reintroduce-the-Advanced-tab-in-the-QPrintProperties.patch 0011-QtPrintSupport-Fix-build.patch - Small change in 0001-Add-remote-print-queue-support.patch so 0007-Allow-access-to-ppd-file-and-ppdMarkOption-via-QPpdP.patch applies cleanly. - Update the license tag (boo#967696) - Update to 5.10.0 final * New bugfix release - Update to 5.10.0 RC 2 * New bugfix release - Update to 5.10.0 RC 1 * New bugfix release OBS-URL: https://build.opensuse.org/request/show/558896 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=71
84 lines
3.8 KiB
Diff
84 lines
3.8 KiB
Diff
From ceccdff4e9fc93819d819b8ed15d95822f980505 Mon Sep 17 00:00:00 2001
|
|
From: Albert Astals Cid <albert.astals.cid@kdab.com>
|
|
Date: Mon, 4 Dec 2017 13:10:17 +0100
|
|
Subject: [PATCH 07/54] Remove QPageSetupWidget::selectPrinter
|
|
|
|
t's only ever called after setPrinter so merge the code
|
|
|
|
Change-Id: I4b5d593edbe62b64354e81c19112fa87b0555fdc
|
|
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
---
|
|
src/printsupport/dialogs/qpagesetupdialog_unix.cpp | 12 ++----------
|
|
src/printsupport/dialogs/qpagesetupdialog_unix_p.h | 3 +--
|
|
src/printsupport/dialogs/qprintdialog_unix.cpp | 3 +--
|
|
3 files changed, 4 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
|
|
index c321552a19..49c0184289 100644
|
|
--- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
|
|
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
|
|
@@ -210,7 +210,7 @@ void QUnixPageSetupDialogPrivate::init()
|
|
Q_Q(QPageSetupDialog);
|
|
|
|
widget = new QPageSetupWidget(q);
|
|
- widget->setPrinter(printer);
|
|
+ widget->setPrinter(printer, printer->outputFormat(), printer->printerName());
|
|
|
|
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok
|
|
| QDialogButtonBox::Cancel,
|
|
@@ -371,7 +371,7 @@ void QPageSetupWidget::initPageSizes()
|
|
|
|
// Set the dialog to use the given QPrinter
|
|
// Usually only called on first creation
|
|
-void QPageSetupWidget::setPrinter(QPrinter *printer)
|
|
+void QPageSetupWidget::setPrinter(QPrinter *printer, QPrinter::OutputFormat outputFormat, const QString &printerName)
|
|
{
|
|
m_printer = printer;
|
|
|
|
@@ -387,14 +387,6 @@ void QPageSetupWidget::setPrinter(QPrinter *printer)
|
|
m_units = m_pageLayout.units();
|
|
m_pagePreview->setPageLayout(m_pageLayout);
|
|
|
|
- // Then update the widget with the current printer details
|
|
- selectPrinter(m_printer->outputFormat(), m_printer->printerName());
|
|
-}
|
|
-
|
|
-// The printer selected in the QPrintDialog has been changed, update the widget to reflect this
|
|
-// Note the QPrinter is not updated at this time in case the user presses the Cancel button in QPrintDialog
|
|
-void QPageSetupWidget::selectPrinter(QPrinter::OutputFormat outputFormat, const QString &printerName)
|
|
-{
|
|
m_outputFormat = outputFormat;
|
|
m_printerName = printerName;
|
|
initPageSizes();
|
|
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix_p.h b/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
|
|
index 658f103bea..c57b01c2d6 100644
|
|
--- a/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
|
|
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
|
|
@@ -72,8 +72,7 @@ public:
|
|
explicit QPageSetupWidget(QWidget *parent = 0);
|
|
explicit QPageSetupWidget(QPrinter *printer, QWidget *parent = 0);
|
|
|
|
- void setPrinter(QPrinter *printer);
|
|
- void selectPrinter(QPrinter::OutputFormat outputFormat, const QString &printerName);
|
|
+ void setPrinter(QPrinter *printer, QPrinter::OutputFormat outputFormat, const QString &printerName);
|
|
void setupPrinter() const;
|
|
|
|
private slots:
|
|
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
|
|
index c7f7488917..f87630f1a0 100644
|
|
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
|
|
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
|
|
@@ -248,8 +248,7 @@ QPrintPropertiesDialog::QPrintPropertiesDialog(QPrinter *printer, QPrinter::Outp
|
|
connect(m_buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(accept()));
|
|
connect(m_buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(reject()));
|
|
|
|
- widget.pageSetup->setPrinter(printer);
|
|
- widget.pageSetup->selectPrinter(outputFormat, printerName);
|
|
+ widget.pageSetup->setPrinter(printer, outputFormat, printerName);
|
|
|
|
#if QT_CONFIG(cupsjobwidget)
|
|
m_jobOptions = new QCupsJobWidget(printer);
|
|
--
|
|
2.15.1
|
|
|