summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorÖmer Fadıl USTA <omerusta@gmail.com>2020-09-17 04:19:49 +0300
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-17 13:29:29 +0200
commitdf8f1b86f8621ddbf21090b72c09c38ecb48709a (patch)
treefb1d5b236ce6997800d84685b53223fac1f8b430 /src
parenta82032351c921c3d5d57122aca57b47f83f9b9d1 (diff)
Fix deprecation documentation about margin and orientation in QPrinter
There were a small typos about those methods and fixed with correct ones. Fixes: QTBUG-86635 Change-Id: Ib853e502fdcdafdf3ddf7ef6d25d368ebc2a631f (adapted from commit 8d8b271fe9cd838f2975392ca9856ac19803f0b6) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpagedpaintdevice.cpp4
-rw-r--r--src/gui/painting/qpdfwriter.cpp6
-rw-r--r--src/printsupport/kernel/qprinter.cpp4
-rw-r--r--src/printsupport/kernel/qprinter.h4
4 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/painting/qpagedpaintdevice.cpp b/src/gui/painting/qpagedpaintdevice.cpp
index e73e8b8bb5..81439b3be8 100644
--- a/src/gui/painting/qpagedpaintdevice.cpp
+++ b/src/gui/painting/qpagedpaintdevice.cpp
@@ -448,7 +448,7 @@ bool QPagedPaintDevice::setPageOrientation(QPageLayout::Orientation orientation)
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().pageMargins().
+ To get the current page margins use pageLayout().margins().
Returns true if the page margins were successfully set to \a margins.
@@ -470,7 +470,7 @@ bool QPagedPaintDevice::setPageMargins(const QMarginsF &margins)
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().pageMargins().
+ To get the current page margins use pageLayout().margins().
Returns true if the page margins were successfully set to \a margins.
diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp
index 32f2194da3..cf30ea496c 100644
--- a/src/gui/painting/qpdfwriter.cpp
+++ b/src/gui/painting/qpdfwriter.cpp
@@ -360,7 +360,7 @@ void QPdfWriter::addFileAttachment(const QString &fileName, const QByteArray &da
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().pageOrientation().
+ To get the current QPageLayout::Orientation use pageLayout().orientation().
Returns true if the page orientation was successfully set to \a orientation.
@@ -378,7 +378,7 @@ void QPdfWriter::addFileAttachment(const QString &fileName, const QByteArray &da
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().pageMargins().
+ To get the current page margins use pageLayout().margins().
Returns true if the page margins were successfully set to \a margins.
@@ -396,7 +396,7 @@ void QPdfWriter::addFileAttachment(const QString &fileName, const QByteArray &da
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().pageMargins().
+ To get the current page margins use pageLayout().margins().
Returns true if the page margins were successfully set to \a margins.
diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp
index b1a5d838b1..ebc42c50c0 100644
--- a/src/printsupport/kernel/qprinter.cpp
+++ b/src/printsupport/kernel/qprinter.cpp
@@ -997,7 +997,7 @@ void QPrinter::setCreator(const QString &creator)
otherwise the \a margins must fall within the printable area for the page
size on the current printer.
- To obtain the current page margins use pageLayout().pageMargins().
+ To obtain the current page margins use pageLayout().margins().
Returns \c true if the page margins was successfully set to \a margins.
@@ -1747,7 +1747,7 @@ void QPrinter::setMargins(const Margins &m)
/*!
\since 4.4
- \obsolete Use pageLayout().pageMargins() instead.
+ \obsolete Use pageLayout().margins() instead.
Returns the page margins for this printer in \a left, \a top, \a
right, \a bottom. The unit of the returned margins are specified
diff --git a/src/printsupport/kernel/qprinter.h b/src/printsupport/kernel/qprinter.h
index ee881f9b03..1b6563d093 100644
--- a/src/printsupport/kernel/qprinter.h
+++ b/src/printsupport/kernel/qprinter.h
@@ -170,7 +170,7 @@ public:
#if QT_DEPRECATED_SINCE(5,15)
QT_DEPRECATED_VERSION_X_5_15("Use setPageOrientation() instead.")
void setOrientation(Orientation);
- QT_DEPRECATED_VERSION_X_5_15("Use pageLayout().pageOrientation() instead.")
+ QT_DEPRECATED_VERSION_X_5_15("Use pageLayout().orientation() instead.")
Orientation orientation() const;
QT_DEPRECATED_VERSION_X_5_15("Use setPageSize(QPageSize) instead.")
@@ -285,7 +285,7 @@ public:
QT_DEPRECATED_VERSION_X_5_15("Use setPageMargins(QMarginsF, QPageLayout::Unit) instead.")
void setPageMargins(qreal left, qreal top, qreal right, qreal bottom, Unit unit);
- QT_DEPRECATED_VERSION_X_5_15("Use pageLayout().pageMargins() instead.")
+ QT_DEPRECATED_VERSION_X_5_15("Use pageLayout().margins() instead.")
void getPageMargins(qreal *left, qreal *top, qreal *right, qreal *bottom, Unit unit) const;
#endif