From 149a9ef23fb71715d34ebfa0ad8c33657664b5e8 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 22 Sep 2020 00:00:20 +0200 Subject: Fix some qdoc warnings: printer API cleanup Puge references from removed QPrinter methods. QPdfWriter's setter API documentation only added the word "PDF" to the QPagedPaintDevice documentation. This was not useful - when the latter talks about "page", it's obvious what is meant in the context of PDF, so remove the duplication. Change-Id: I7b16cbc82de8d35b5224288c9e36deff4e01fb44 Reviewed-by: Paul Wicking --- src/gui/painting/qpdfwriter.cpp | 107 ----------------------------------- src/printsupport/kernel/qprinter.cpp | 10 ++-- 2 files changed, 5 insertions(+), 112 deletions(-) diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp index d97b663a45..0bb0e81761 100644 --- a/src/gui/painting/qpdfwriter.cpp +++ b/src/gui/painting/qpdfwriter.cpp @@ -310,113 +310,6 @@ void QPdfWriter::addFileAttachment(const QString &fileName, const QByteArray &da d->engine->addFileAttachment(fileName, data, mimeType); } -// Defined in QPagedPaintDevice but non-virtual, add QPdfWriter specific doc here -#ifdef Q_QDOC -/*! - \fn bool QPdfWriter::setPageLayout(const QPageLayout &newPageLayout) - \since 5.3 - - Sets the PDF page layout to \a newPageLayout. - - You should call this before calling QPainter::begin(), or immediately - before calling newPage() to apply the new page layout to a new page. - You should not call any painting methods between a call to setPageLayout() - and newPage() as the wrong paint metrics may be used. - - Returns true if the page layout was successfully set to \a newPageLayout. - - \sa pageLayout() -*/ - -/*! - \fn bool QPdfWriter::setPageSize(const QPageSize &pageSize) - \since 5.3 - - Sets the PDF page size to \a pageSize. - - To get the current QPageSize use pageLayout().pageSize(). - - You should call this before calling QPainter::begin(), or immediately - before calling newPage() to apply the new page size to a new page. - You should not call any painting methods between a call to setPageSize() - and newPage() as the wrong paint metrics may be used. - - Returns true if the page size was successfully set to \a pageSize. - - \sa pageLayout() -*/ - -/*! - \fn bool QPdfWriter::setPageOrientation(QPageLayout::Orientation orientation) - \since 5.3 - - Sets the PDF page \a orientation. - - The page orientation is used to define the orientation of the - page size when obtaining the page rect. - - You should call this before calling QPainter::begin(), or immediately - before calling newPage() to apply the new orientation to a new page. - You should not call any painting methods between a call to setPageOrientation() - and newPage() as the wrong paint metrics may be used. - - To get the current QPageLayout::Orientation use pageLayout().orientation(). - - Returns true if the page orientation was successfully set to \a orientation. - - \sa pageLayout() -*/ - -/*! - \fn bool QPdfWriter::setPageMargins(const QMarginsF &margins) - \since 5.3 - - Set the PDF page \a margins in the current page layout units. - - You should call this before calling QPainter::begin(), or immediately - before calling newPage() to apply the new margins to a new page. - You should not call any painting methods between a call to setPageMargins() - and newPage() as the wrong paint metrics may be used. - - To get the current page margins use pageLayout().margins(). - - Returns true if the page margins were successfully set to \a margins. - - \sa pageLayout() -*/ - -/*! - \fn bool QPdfWriter::setPageMargins(const QMarginsF &margins, QPageLayout::Unit units) - \since 5.3 - - Set the PDF page \a margins defined in the given \a units. - - You should call this before calling QPainter::begin(), or immediately - before calling newPage() to apply the new margins to a new page. - You should not call any painting methods between a call to setPageMargins() - and newPage() as the wrong paint metrics may be used. - - To get the current page margins use pageLayout().margins(). - - Returns true if the page margins were successfully set to \a margins. - - \sa pageLayout() -*/ - -/*! - \fn QPageLayout QPdfWriter::pageLayout() const - \since 5.3 - - Returns the current page layout. Use this method to access the current - QPageSize, QPageLayout::Orientation, QMarginsF, fullRect() and paintRect(). - - Note that you cannot use the setters on the returned object, you must either - call the individual QPdfWriter methods or use setPageLayout(). - - \sa setPageLayout(), setPageSize(), setPageOrientation(), setPageMargins() -*/ -#endif - /*! \internal diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index 8166e816f3..ec5b868ea5 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -1017,12 +1017,12 @@ void QPrinter::setCollateCopies(bool collate) coordinate system coincides with the top-left corner of the paper itself. In this case, the \l{QPaintDevice::PaintDeviceMetric}{device metrics} will report - the exact same dimensions as indicated by \l{PaperSize}. It may not + the exact same dimensions as indicated by \{QPageSize}. It may not be possible to print on the entire physical page because of the printer's margins, so the application must account for the margins itself. - \sa fullPage(), pageLayout(), setPageSize(), width(), height() + \sa fullPage(), QPagedPaintDevice::pageLayout(), QPagedPaintDevice::setPageSize() */ void QPrinter::setFullPage(bool fp) @@ -1040,7 +1040,7 @@ void QPrinter::setFullPage(bool fp) See setFullPage() for details and caveats. - \sa setFullPage(), pageLayout() + \sa setFullPage(), QPagedPaintDevice::pageLayout() */ bool QPrinter::fullPage() const @@ -1060,7 +1060,7 @@ bool QPrinter::fullPage() const This function must be called before QPainter::begin() to have an effect on all platforms. - \sa resolution(), setPaperSize() + \sa resolution(), QPagedPaintDevice::setPageSize() */ void QPrinter::setResolution(int dpi) @@ -1187,7 +1187,7 @@ QPrinter::DuplexMode QPrinter::duplex() const than the paperRect() since the page normally has margins between its borders and the paper. - \sa paperSize() + \sa QPagedPaintDevice::pageLayout() */ QRectF QPrinter::pageRect(Unit unit) const { -- cgit v1.2.3