From 1ffd79bfb7261268ea4b56d29122a48334a115a1 Mon Sep 17 00:00:00 2001 From: John Layt Date: Tue, 28 Jan 2014 15:05:17 +0100 Subject: QPrinter - Fix winPageSize() on Mac and Linux Using QPageSize internally provides the Windows ID on all platforms so remove the conditional compile on the QPrinter api and add support to the print engines. Change-Id: I31e23d5090a9b6ceb087c29dead050b0ee1855a5 Reviewed-by: Lars Knoll --- src/printsupport/kernel/qprinter.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/printsupport/kernel/qprinter.cpp') diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index f72a0ae0fb..65dcf515b7 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -1882,16 +1882,12 @@ QPrintEngine *QPrinter::printEngine() const return d->printEngine; } -#if defined (Q_OS_WIN) /*! \obsolete Use QPageSize::id(windowsId) and setPageLayout(QPageSize) instead. Sets the page size to be used by the printer under Windows to \a pageSize. - \warning This function is not portable so you may prefer to use - setPaperSize() instead. - \sa pageLayout() */ void QPrinter::setWinPageSize(int pageSize) @@ -1906,9 +1902,6 @@ void QPrinter::setWinPageSize(int pageSize) Returns the page size used by the printer under Windows. - \warning This function is not portable so you may prefer to use - paperSize() instead. - \sa pageLayout() */ int QPrinter::winPageSize() const @@ -1916,7 +1909,6 @@ int QPrinter::winPageSize() const Q_D(const QPrinter); return d->printEngine->property(QPrintEngine::PPK_WindowsPageSize).toInt(); } -#endif // Q_OS_WIN /*! Returns a list of the resolutions (a list of dots-per-inch -- cgit v1.2.1