From 10f3c2bca60362b1268b64ea743cb66ae05bfe14 Mon Sep 17 00:00:00 2001 From: John Layt Date: Thu, 23 Jan 2014 16:37:54 +0100 Subject: QPrinter - Fix PaperSources An earlier commit add new PaperSources for First and Last, but after looking at wingdi.h it turns out these are just the first and last DMBIN values, and Upper is equal to OnlyOne. Remove First and Last, but keep the Upper and CustomSource for use later by PPD based printer systems. Change-Id: I298472a1f54efcc584e73dec944b96fc91426c1b Reviewed-by: Lars Knoll --- src/printsupport/kernel/qprintengine_win.cpp | 6 ++---- src/printsupport/kernel/qprinter.cpp | 2 -- src/printsupport/kernel/qprinter.h | 6 ++---- 3 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src/printsupport') diff --git a/src/printsupport/kernel/qprintengine_win.cpp b/src/printsupport/kernel/qprintengine_win.cpp index 958e4a0989..da328418b7 100644 --- a/src/printsupport/kernel/qprintengine_win.cpp +++ b/src/printsupport/kernel/qprintengine_win.cpp @@ -182,7 +182,7 @@ static const struct { int winSourceName; QPrinter::PaperSource qtSourceName; } sources[] = { - { DMBIN_ONLYONE, QPrinter::OnlyOne }, + { DMBIN_UPPER, QPrinter::Upper }, // = DBMIN_ONLYONE { DMBIN_LOWER, QPrinter::Lower }, { DMBIN_MIDDLE, QPrinter::Middle }, { DMBIN_MANUAL, QPrinter::Manual }, @@ -195,9 +195,7 @@ static const struct { { DMBIN_LARGECAPACITY, QPrinter::LargeCapacity }, { DMBIN_CASSETTE, QPrinter::Cassette }, { DMBIN_FORMSOURCE, QPrinter::FormSource }, - { DMBIN_FIRST, QPrinter::First }, - { DMBIN_LAST, QPrinter::Last }, - { DMBIN_UPPER, QPrinter::Upper }, + { DMBIN_USER, QPrinter::CustomSource }, { 0, (QPrinter::PaperSource) -1 } }; diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index 366e3bc844..86985fa7ca 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -521,8 +521,6 @@ void QPrinterPrivate::setProperty(QPrintEngine::PrintEnginePropertyKey key, cons \value OnlyOne \value Tractor \value SmallFormat - \value First - \value Last \value Upper \value CustomSource A PaperSource defined by the printer that is unknown to Qt \value LastPaperSource The highest valid PaperSource value, currently CustomSource diff --git a/src/printsupport/kernel/qprinter.h b/src/printsupport/kernel/qprinter.h index 54047c0c32..679f3af043 100644 --- a/src/printsupport/kernel/qprinter.h +++ b/src/printsupport/kernel/qprinter.h @@ -104,11 +104,9 @@ public: Cassette, FormSource, MaxPageSource, // Deprecated - First, - Last, - Upper, CustomSource, - LastPaperSource = CustomSource + LastPaperSource = CustomSource, + Upper = OnlyOne // As defined in Windows }; enum PrinterState { Idle, -- cgit v1.2.3