summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpagelayout.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/qpagelayout.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/qpagelayout.h')
-rw-r--r--src/gui/painting/qpagelayout.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/painting/qpagelayout.h b/src/gui/painting/qpagelayout.h
index a7858edfaf..0b2f7c59dd 100644
--- a/src/gui/painting/qpagelayout.h
+++ b/src/gui/painting/qpagelayout.h
@@ -132,15 +132,18 @@ public:
private:
friend class QPageLayoutPrivate;
+ bool equals(const QPageLayout &other) const;
+
+ friend inline bool operator==(const QPageLayout &lhs, const QPageLayout &rhs)
+ { return lhs.equals(rhs); }
+ friend inline bool operator!=(const QPageLayout &lhs, const QPageLayout &rhs)
+ { return !lhs.equals(rhs); }
+
QExplicitlySharedDataPointer<QPageLayoutPrivate> d;
};
Q_DECLARE_SHARED(QPageLayout)
-Q_GUI_EXPORT bool operator==(const QPageLayout &lhs, const QPageLayout &rhs);
-inline bool operator!=(const QPageLayout &lhs, const QPageLayout &rhs)
-{ return !operator==(lhs, rhs); }
-
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QPageLayout &pageLayout);
#endif