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
86 lines
3.0 KiB
Diff
86 lines
3.0 KiB
Diff
From f135d515e8d6aaf1c136aef68e08b4f759075310 Mon Sep 17 00:00:00 2001
|
|
From: Albert Astals Cid <albert.astals.cid@kdab.com>
|
|
Date: Mon, 4 Dec 2017 12:53:04 +0100
|
|
Subject: [PATCH 04/54] Remove QPrintPropertiesDialog::applyPrinterProperties
|
|
|
|
It's only ever called after the constructor so merge its code to the constructor
|
|
|
|
Change-Id: Icca88764f725b9aeaa08ee7387da8885be247fba
|
|
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
---
|
|
src/printsupport/dialogs/qprintdialog_unix.cpp | 21 ++++++---------------
|
|
1 file changed, 6 insertions(+), 15 deletions(-)
|
|
|
|
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
|
|
index 66d37dbec3..6cccdd03cd 100644
|
|
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
|
|
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
|
|
@@ -124,13 +124,11 @@ class QPrintPropertiesDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
- QPrintPropertiesDialog(QAbstractPrintDialog *parent = nullptr);
|
|
+ QPrintPropertiesDialog(QPrinter *printer, QAbstractPrintDialog *parent = nullptr);
|
|
~QPrintPropertiesDialog();
|
|
|
|
void selectPrinter(QPrinter::OutputFormat outputFormat, const QString &printerName);
|
|
|
|
- /// copy printer properties to the widget
|
|
- void applyPrinterProperties(QPrinter *p);
|
|
void setupPrinter() const;
|
|
|
|
private:
|
|
@@ -236,7 +234,7 @@ public:
|
|
|
|
*/
|
|
|
|
-QPrintPropertiesDialog::QPrintPropertiesDialog(QAbstractPrintDialog *parent)
|
|
+QPrintPropertiesDialog::QPrintPropertiesDialog(QPrinter *printer, QAbstractPrintDialog *parent)
|
|
: QDialog(parent)
|
|
{
|
|
setWindowTitle(tr("Printer Properties"));
|
|
@@ -250,8 +248,11 @@ QPrintPropertiesDialog::QPrintPropertiesDialog(QAbstractPrintDialog *parent)
|
|
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);
|
|
+
|
|
#if QT_CONFIG(cupsjobwidget)
|
|
m_jobOptions = new QCupsJobWidget();
|
|
+ m_jobOptions->setPrinter(printer);
|
|
widget.tabs->addTab(m_jobOptions, tr("Job Options"));
|
|
#endif
|
|
}
|
|
@@ -260,14 +261,6 @@ QPrintPropertiesDialog::~QPrintPropertiesDialog()
|
|
{
|
|
}
|
|
|
|
-void QPrintPropertiesDialog::applyPrinterProperties(QPrinter *p)
|
|
-{
|
|
- widget.pageSetup->setPrinter(p);
|
|
-#if QT_CONFIG(cupsjobwidget)
|
|
- m_jobOptions->setPrinter(p);
|
|
-#endif
|
|
-}
|
|
-
|
|
void QPrintPropertiesDialog::setupPrinter() const
|
|
{
|
|
widget.pageSetup->setupPrinter();
|
|
@@ -846,12 +839,10 @@ void QUnixPrintWidgetPrivate::setupPrinterProperties()
|
|
if (propertiesDialog)
|
|
delete propertiesDialog;
|
|
|
|
- propertiesDialog = new QPrintPropertiesDialog(q);
|
|
+ propertiesDialog = new QPrintPropertiesDialog(q->printer(), q);
|
|
propertiesDialog->setResult(QDialog::Rejected);
|
|
propertiesDialogShown = false;
|
|
|
|
- propertiesDialog->applyPrinterProperties(q->printer());
|
|
-
|
|
if (q->isOptionEnabled(QPrintDialog::PrintToFile)
|
|
&& (widget.printers->currentIndex() == widget.printers->count() - 1)) {// PDF
|
|
propertiesDialog->selectPrinter(QPrinter::PdfFormat, QString());
|
|
--
|
|
2.15.1
|
|
|