summaryrefslogtreecommitdiff
path: root/src/gui/painting/qpagesize.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-28 00:02:59 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-28 22:14:56 +0100
commita45a3b1ece490bcae5cccd858dbe11408a19bee0 (patch)
tree4bfee963625fab42fc7b9d14608916cb38678994 /src/gui/painting/qpagesize.cpp
parent979c8cf1b75e3e0e0dcf7c718c3fed6fdfdd7ea3 (diff)
downloadqtbase-a45a3b1ece490bcae5cccd858dbe11408a19bee0.tar.gz
Make comparison operators in gui/painting classes hidden friends
Reduce ADL noise from QColorSpace, QPageSize, and QPageLayout with the help of a private equals method. Change-Id: I0082597dd216b982e8d8eb5a4bd7dd29a5d3263b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/painting/qpagesize.cpp')
-rw-r--r--src/gui/painting/qpagesize.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/gui/painting/qpagesize.cpp b/src/gui/painting/qpagesize.cpp
index 7ae3e93f5a..fb7eb45b93 100644
--- a/src/gui/painting/qpagesize.cpp
+++ b/src/gui/painting/qpagesize.cpp
@@ -1249,20 +1249,15 @@ QPageSize &QPageSize::operator=(const QPageSize &other)
*/
/*!
- \relates QPageSize
+ \fn bool QPageSize::operator==(const QPageSize &lhs, const QPageSize &rhs)
Returns \c true if page size \a lhs is equal to page size \a rhs,
i.e. if the page sizes have the same attributes. Current
attributes are size and name.
*/
-bool operator==(const QPageSize &lhs, const QPageSize &rhs)
-{
- return lhs.d == rhs.d || *lhs.d == *rhs.d;
-}
/*!
- \fn bool operator!=(const QPageSize &lhs, const QPageSize &rhs)
- \relates QPageSize
+ \fn bool QPageSize::operator!=(const QPageSize &lhs, const QPageSize &rhs)
Returns \c true if page size \a lhs is unequal to page size \a
rhs, i.e. if the page size has different attributes. Current
@@ -1270,6 +1265,15 @@ bool operator==(const QPageSize &lhs, const QPageSize &rhs)
*/
/*!
+ \internal
+*/
+bool QPageSize::equals(const QPageSize &other) const
+{
+ return d == other.d || *d == *other.d;
+}
+
+
+/*!
Returns \c true if this page is equivalent to the \a other page, i.e. if the
page has the same size regardless of other attributes like name.
*/