From 74a51d590f4acd189f8d0594a5a706cbf97c805b Mon Sep 17 00:00:00 2001 From: John Layt Date: Mon, 17 Mar 2014 17:59:55 +0100 Subject: QPrinter - Fix DuplexMode on all platforms Add support to get/set the DuplexMode on Windows and Mac, improve the CUPS duplex handling, ensure support is the same on all platforms. [ChangeLog][QtPrintSupport][QPrinter] Added duplex support for Windows and OS X. Task-number: QTBUG-11332 Change-Id: I9d61d63233d828c3b1fd6df54072c6049f3c6298 Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/plugins/printsupport/cups/qcupsprintengine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/plugins/printsupport/cups/qcupsprintengine.cpp') diff --git a/src/plugins/printsupport/cups/qcupsprintengine.cpp b/src/plugins/printsupport/cups/qcupsprintengine.cpp index 724ff5b98b..d7cd18f1d1 100644 --- a/src/plugins/printsupport/cups/qcupsprintengine.cpp +++ b/src/plugins/printsupport/cups/qcupsprintengine.cpp @@ -85,6 +85,12 @@ void QCupsPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &v // Get the named page size from the printer if supported d->setPageSize(d->m_printDevice.supportedPageSize(value.toString())); break; + case PPK_Duplex: { + QPrint::DuplexMode mode = QPrint::DuplexMode(value.toInt()); + if (mode != d->duplex && d->m_printDevice.supportedDuplexModes().contains(mode)) + d->duplex = mode; + break; + } case PPK_PrinterName: d->changePrinter(value.toString()); break; -- cgit v1.2.3