diff options
author | Albert Astals Cid <albert.astals.cid@kdab.com> | 2018-02-06 11:22:13 +0100 |
---|---|---|
committer | Albert Astals Cid <albert.astals.cid@kdab.com> | 2018-02-20 07:56:19 +0000 |
commit | d945e118371c56c7008db3632a871efe23605650 (patch) | |
tree | b74fcb539833bf9a9551acd64b82de5735642e79 /src/printsupport/kernel | |
parent | d145d291cdd9f9368e047b875d1a41d131ec403a (diff) |
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 <andy.shaw@qt.io>
Diffstat (limited to 'src/printsupport/kernel')
-rw-r--r-- | src/printsupport/kernel/qprintengine_pdf.cpp | 10 | ||||
-rw-r--r-- | src/printsupport/kernel/qprintengine_pdf_p.h | 1 |
2 files changed, 3 insertions, 8 deletions
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<QPrint::DuplexMode>(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), diff --git a/src/printsupport/kernel/qprintengine_pdf_p.h b/src/printsupport/kernel/qprintengine_pdf_p.h index bb01a2e9e1..e7ae21f260 100644 --- a/src/printsupport/kernel/qprintengine_pdf_p.h +++ b/src/printsupport/kernel/qprintengine_pdf_p.h @@ -130,7 +130,6 @@ private: QString printProgram; QString selectionOption; - QPrint::DuplexMode duplex; bool collate; int copies; QPrinter::PageOrder pageOrder; |