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 <lars.knoll@digia.com>
This commit is contained in:
John Layt 2014-01-23 16:37:54 +01:00 committed by The Qt Project
parent 75aef26c27
commit 10f3c2bca6
3 changed files with 4 additions and 10 deletions

View File

@ -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 }
};

View File

@ -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

View File

@ -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,