summaryrefslogtreecommitdiffstats
path: root/src/printsupport
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2014-01-23 16:37:54 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-05 19:34:14 +0100
commit10f3c2bca60362b1268b64ea743cb66ae05bfe14 (patch)
treee5b4ef460d2ab828985bf37eabb3065296db8e2d /src/printsupport
parent75aef26c278dc21bb3fc5bc7faa06e95666aeb76 (diff)
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>
Diffstat (limited to 'src/printsupport')
-rw-r--r--src/printsupport/kernel/qprintengine_win.cpp6
-rw-r--r--src/printsupport/kernel/qprinter.cpp2
-rw-r--r--src/printsupport/kernel/qprinter.h6
3 files changed, 4 insertions, 10 deletions
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,