From d945e118371c56c7008db3632a871efe23605650 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 6 Feb 2018 11:22:13 +0100 Subject: Move duplex member from QPdfPrintEnginePrivate to QCupsPrintEnginePrivate Duplex doesn't really make sense in the context of printing to pdf, and the variable was only being used in QCupsPrintEnginePrivate anyway Change-Id: I801634c56759572825b5c9549d7a1dc92e5697a0 Reviewed-by: Andy Shaw --- src/printsupport/kernel/qprintengine_pdf.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/printsupport/kernel/qprintengine_pdf.cpp') diff --git a/src/printsupport/kernel/qprintengine_pdf.cpp b/src/printsupport/kernel/qprintengine_pdf.cpp index 0230ebddc8..3c24e5ac69 100644 --- a/src/printsupport/kernel/qprintengine_pdf.cpp +++ b/src/printsupport/kernel/qprintengine_pdf.cpp @@ -132,6 +132,8 @@ void QPdfPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va // The following keys are settings that are unsupported by the PDF PrintEngine case PPK_CustomBase: break; + case PPK_Duplex: + break; // The following keys are properties and settings that are supported by the PDF PrintEngine case PPK_CollateCopies: @@ -203,9 +205,6 @@ void QPdfPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va case PPK_FontEmbedding: d->embedFonts = value.toBool(); break; - case PPK_Duplex: - d->duplex = static_cast(value.toInt()); - break; case PPK_CustomPaperSize: d->m_pageLayout.setPageSize(QPageSize(value.toSizeF(), QPageSize::Point)); break; @@ -249,6 +248,7 @@ QVariant QPdfPrintEngine::property(PrintEnginePropertyKey key) const // The following keys are settings that are unsupported by the PDF PrintEngine // Return sensible default values to ensure consistent behavior across platforms case PPK_CustomBase: + case PPK_Duplex: // Special case, leave null break; @@ -322,9 +322,6 @@ QVariant QPdfPrintEngine::property(PrintEnginePropertyKey key) const case PPK_FontEmbedding: ret = d->embedFonts; break; - case PPK_Duplex: - ret = d->duplex; - break; case PPK_CustomPaperSize: ret = d->m_pageLayout.fullRectPoints().size(); break; @@ -389,7 +386,6 @@ void QPdfPrintEnginePrivate::closePrintDevice() QPdfPrintEnginePrivate::QPdfPrintEnginePrivate(QPrinter::PrinterMode m) : QPdfEnginePrivate(), - duplex(QPrint::DuplexNone), collate(true), copies(1), pageOrder(QPrinter::FirstPageFirst), -- cgit v1.2.3