summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprintengine_win.cpp
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-11-29 19:13:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-05 19:33:54 +0100
commit0ee72b09fd99b756a85de78bafb03c7dee163ef5 (patch)
treee252fd5f7af2e21aea54eaa2611f28faee3d2bbb /src/printsupport/kernel/qprintengine_win.cpp
parent27473f19bb26b5b4434689c663d483e48b43fdef (diff)
QPrintEngine - Fix PPK_CollateCopies
Mac supports Collate Copies using native api, so add support. Note this is mostly only useful for setting the print dialog default, as Mac supports server-side multiple copies so the app will never need to collate the copies itself. Change PDF and Windows to default to collate true to match Mac as this is the behavior users expect. Task-number: QTBUG-27724 Task-number: QTBUG-35251 Task-number: QTBUG-22144 Change-Id: Ia43dbc260b3a71aa5b267cca54c168ffbea794fc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/printsupport/kernel/qprintengine_win.cpp')
-rw-r--r--src/printsupport/kernel/qprintengine_win.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/printsupport/kernel/qprintengine_win.cpp b/src/printsupport/kernel/qprintengine_win.cpp
index 34f3106313..d48c1a730d 100644
--- a/src/printsupport/kernel/qprintengine_win.cpp
+++ b/src/printsupport/kernel/qprintengine_win.cpp
@@ -1098,6 +1098,7 @@ void QWin32PrintEnginePrivate::initialize()
if (devMode) {
num_copies = devMode->dmCopies;
+ devMode->dmCollate = DMCOLLATE_TRUE;
}
initHDC();
@@ -1504,10 +1505,6 @@ QVariant QWin32PrintEngine::property(PrintEnginePropertyKey key) const
// The following keys are settings that are unsupported by the Windows PrintEngine
// Return sensible default values to ensure consistent behavior across platforms
- case PPK_CollateCopies:
- // TODO Add support using DEVMODE.dmCollate to match setting
- value = false;
- break;
case PPK_Creator:
value = QString();
break;
@@ -1529,6 +1526,10 @@ QVariant QWin32PrintEngine::property(PrintEnginePropertyKey key) const
break;
// The following keys are properties and settings that are supported by the Windows PrintEngine
+ case PPK_CollateCopies:
+ value = d->devMode->dmCollate == DMCOLLATE_TRUE;
+ break;
+
case PPK_ColorMode:
{
if (!d->devMode) {