From b188221fee0eaacec115b514185a0508ef655897 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 21 Mar 2012 17:17:42 +0200 Subject: 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 --- src/printsupport/kernel/qprinter.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/printsupport/kernel/qprinter.h') diff --git a/src/printsupport/kernel/qprinter.h b/src/printsupport/kernel/qprinter.h index 17b125bbf8..23c7ccc40c 100644 --- a/src/printsupport/kernel/qprinter.h +++ b/src/printsupport/kernel/qprinter.h @@ -200,7 +200,7 @@ public: QList supportedResolutions() const; -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN QList supportedPaperSources() const; #endif @@ -210,7 +210,7 @@ public: void setDoubleSidedPrinting(bool enable); bool doubleSidedPrinting() const; -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN void setWinPageSize(int winPageSize); int winPageSize() const; #endif @@ -220,7 +220,7 @@ public: QRectF paperRect(Unit) const; QRectF pageRect(Unit) const; -#if !defined(Q_WS_WIN) || defined(qdoc) +#if !defined(Q_OS_WIN) || defined(qdoc) QString printerSelectionOption() const; void setPrinterSelectionOption(const QString &); #endif @@ -233,11 +233,6 @@ public: QPaintEngine *paintEngine() const; QPrintEngine *printEngine() const; -#ifdef Q_WS_WIN - HDC getDC() const; - void releaseDC(HDC hdc) const; -#endif - void setFromTo(int fromPage, int toPage); int fromPage() const; int toPage() const; -- cgit v1.2.3