Fix QPrinter test in Windows
authorMiikka Heikkinen <miikka.heikkinen@digia.com>
Wed, 21 Mar 2012 15:17:42 +0000 (17:17 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 22 Mar 2012 23:41:34 +0000 (00:41 +0100)
commitb188221fee0eaacec115b514185a0508ef655897
tree167b09e47cc3b63dadf64527339a4248eda770b3
parent82c974f753e0081f8bedc356ea07a8cfa6fae583
Fix QPrinter test in Windows

Fixed Q_WS_WIN flagging to Q_OS_WIN in QPrinter API and related
implementation to make API match the documentation and Qt 4.8.
Also Removed the unused internal HDC related functions from the API,
that were previously behind Q_WS_WIN flag.

Some of the properties tested are documented to be valid for native
print engine only in X11 environment, so skipped testing those in
non-xcb environments.

Copy collation is also apparently not supported in Windows native print
engine, though this seems to be undocumented, so skipped that only in
Windows.

At least one of the test blocks in tst_QPrinter::valuePreservation()
failed due to default printer not getting set properly, so fixed that,
too.

Task-number: QTBUG-24191
Task-number: QTBUG-22927
Change-Id: I44a5e3d647a1279fcc7f1e99de6881f9be330246
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/plugins/printsupport/windows/qwindowsprintersupport.cpp
src/printsupport/kernel/qprintengine.h
src/printsupport/kernel/qprintengine_win.cpp
src/printsupport/kernel/qprintengine_win_p.h
src/printsupport/kernel/qprinter.cpp
src/printsupport/kernel/qprinter.h
tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp