summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-27 23:54:08 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-28 20:36:12 +0100
commita3d71792ca018b1cff06dbefde20f6f4e06ee704 (patch)
tree6376412068fe583d2f9090c5f8afe69960c2be52 /src/gui/kernel/qevent.cpp
parent9b35f22b58bfdf0e88dfc5baa4387968a81c169a (diff)
Make comparison operators hidden friends
Reduce ADL noise from QKeyEvent, QKeySequence::StandardKey, and QPointingDeviceUniqueId. Task-number: QTBUG-87973 Change-Id: Ib4a3190d03046949acb25b3fe68c611689b82565 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r--src/gui/kernel/qevent.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index b60672ce17..0c3b631608 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -5312,20 +5312,15 @@ qint64 QPointingDeviceUniqueId::numericId() const noexcept
}
/*!
- \relates QPointingDeviceUniqueId
+ \fn bool QPointingDeviceUniqueId::operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
\since 5.8
Returns whether the two unique pointer IDs \a lhs and \a rhs identify the same pointer
(\c true) or not (\c false).
*/
-bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs) noexcept
-{
- return lhs.numericId() == rhs.numericId();
-}
/*!
- \fn bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
- \relates QPointingDeviceUniqueId
+ \fn bool QPointingDeviceUniqueId::operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
\since 5.8
Returns whether the two unique pointer IDs \a lhs and \a rhs identify different pointers
@@ -5333,6 +5328,14 @@ bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs) noexce
*/
/*!
+ \internal
+*/
+bool QPointingDeviceUniqueId::equals(QPointingDeviceUniqueId other) const noexcept
+{
+ return numericId() == other.numericId();
+}
+
+/*!
\relates QPointingDeviceUniqueId
\since 5.8