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
76 lines
2.6 KiB
Diff
76 lines
2.6 KiB
Diff
From 881690969cc5a6a78df41e2d80ea1fa7bf07cb27 Mon Sep 17 00:00:00 2001
|
|
From: Albert Astals Cid <albert.astals.cid@kdab.com>
|
|
Date: Mon, 4 Dec 2017 12:57:40 +0100
|
|
Subject: [PATCH 05/54] Remove QCupsJobWidget::setPrinter
|
|
|
|
It is only ever called after the constructor so merge the code
|
|
|
|
Change-Id: I381165ad90c85342e5db3c16327d729388b71fb2
|
|
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
---
|
|
src/printsupport/dialogs/qprintdialog_unix.cpp | 3 +--
|
|
src/printsupport/widgets/qcupsjobwidget.cpp | 10 +++-------
|
|
src/printsupport/widgets/qcupsjobwidget_p.h | 3 +--
|
|
3 files changed, 5 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
|
|
index 6cccdd03cd..8c9997d572 100644
|
|
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
|
|
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
|
|
@@ -251,8 +251,7 @@ QPrintPropertiesDialog::QPrintPropertiesDialog(QPrinter *printer, QAbstractPrint
|
|
widget.pageSetup->setPrinter(printer);
|
|
|
|
#if QT_CONFIG(cupsjobwidget)
|
|
- m_jobOptions = new QCupsJobWidget();
|
|
- m_jobOptions->setPrinter(printer);
|
|
+ m_jobOptions = new QCupsJobWidget(printer);
|
|
widget.tabs->addTab(m_jobOptions, tr("Job Options"));
|
|
#endif
|
|
}
|
|
diff --git a/src/printsupport/widgets/qcupsjobwidget.cpp b/src/printsupport/widgets/qcupsjobwidget.cpp
|
|
index 00f2d64df2..8fb07c86b0 100644
|
|
--- a/src/printsupport/widgets/qcupsjobwidget.cpp
|
|
+++ b/src/printsupport/widgets/qcupsjobwidget.cpp
|
|
@@ -64,8 +64,9 @@ QT_BEGIN_NAMESPACE
|
|
\inmodule QtPrintSupport
|
|
*/
|
|
|
|
-QCupsJobWidget::QCupsJobWidget(QWidget *parent)
|
|
- : QWidget(parent)
|
|
+QCupsJobWidget::QCupsJobWidget(QPrinter *printer, QWidget *parent)
|
|
+ : QWidget(parent),
|
|
+ m_printer(printer)
|
|
{
|
|
m_ui.setupUi(this);
|
|
//set all the default values
|
|
@@ -80,11 +81,6 @@ QCupsJobWidget::~QCupsJobWidget()
|
|
{
|
|
}
|
|
|
|
-void QCupsJobWidget::setPrinter(QPrinter *printer)
|
|
-{
|
|
- m_printer = printer;
|
|
-}
|
|
-
|
|
void QCupsJobWidget::setupPrinter()
|
|
{
|
|
QCUPSSupport::setJobHold(m_printer, jobHold(), jobHoldTime());
|
|
diff --git a/src/printsupport/widgets/qcupsjobwidget_p.h b/src/printsupport/widgets/qcupsjobwidget_p.h
|
|
index 7d3c15938f..2aca6bc928 100644
|
|
--- a/src/printsupport/widgets/qcupsjobwidget_p.h
|
|
+++ b/src/printsupport/widgets/qcupsjobwidget_p.h
|
|
@@ -71,9 +71,8 @@ class QCupsJobWidget : public QWidget
|
|
Q_OBJECT
|
|
|
|
public:
|
|
- explicit QCupsJobWidget(QWidget *parent = 0);
|
|
+ explicit QCupsJobWidget(QPrinter *printer, QWidget *parent = nullptr);
|
|
~QCupsJobWidget();
|
|
- void setPrinter(QPrinter *printer);
|
|
void setupPrinter();
|
|
|
|
private Q_SLOTS:
|
|
--
|
|
2.15.1
|
|
|