summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpagesize.h
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.h
parent979c8cf1b75e3e0e0dcf7c718c3fed6fdfdd7ea3 (diff)
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.h')
-rw-r--r--src/gui/painting/qpagesize.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/painting/qpagesize.h b/src/gui/painting/qpagesize.h
index fbaec0da3f..72d24ed938 100644
--- a/src/gui/painting/qpagesize.h
+++ b/src/gui/painting/qpagesize.h
@@ -283,6 +283,13 @@ public:
private:
friend class QPageSizePrivate;
friend class QPlatformPrintDevice;
+
+ bool equals(const QPageSize &other) const;
+ friend inline bool operator==(const QPageSize &lhs, const QPageSize &rhs)
+ { return lhs.equals(rhs); }
+ friend inline bool operator!=(const QPageSize &lhs, const QPageSize &rhs)
+ { return !(lhs == rhs); }
+
QPageSize(const QString &key, const QSize &pointSize, const QString &name);
QPageSize(int windowsId, const QSize &pointSize, const QString &name);
QPageSize(QPageSizePrivate &dd);
@@ -291,10 +298,6 @@ private:
Q_DECLARE_SHARED(QPageSize)
-Q_GUI_EXPORT bool operator==(const QPageSize &lhs, const QPageSize &rhs);
-inline bool operator!=(const QPageSize &lhs, const QPageSize &rhs)
-{ return !operator==(lhs, rhs); }
-
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QPageSize &pageSize);
#endif