QMetaMethod: Make comparison operators hidden friends
Reduce ADL noise. Change-Id: Ic747c2d76b7ce66b222e08eeaf6f1d193ba99f81 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
5866b82e24
commit
2222e695fc
@ -1640,18 +1640,16 @@ bool QMetaObject::invokeMethodImpl(QObject *object, QtPrivate::QSlotObjectBase *
|
|||||||
invoked), otherwise returns \c false.
|
invoked), otherwise returns \c false.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn bool operator==(const QMetaMethod &m1, const QMetaMethod &m2)
|
/*! \fn bool QMetaMethod::operator==(const QMetaMethod &m1, const QMetaMethod &m2)
|
||||||
\since 5.0
|
\since 5.0
|
||||||
\relates QMetaMethod
|
|
||||||
\overload
|
\overload
|
||||||
|
|
||||||
Returns \c true if method \a m1 is equal to method \a m2,
|
Returns \c true if method \a m1 is equal to method \a m2,
|
||||||
otherwise returns \c false.
|
otherwise returns \c false.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn bool operator!=(const QMetaMethod &m1, const QMetaMethod &m2)
|
/*! \fn bool QMetaMethod::operator!=(const QMetaMethod &m1, const QMetaMethod &m2)
|
||||||
\since 5.0
|
\since 5.0
|
||||||
\relates QMetaMethod
|
|
||||||
\overload
|
\overload
|
||||||
|
|
||||||
Returns \c true if method \a m1 is not equal to method \a m2,
|
Returns \c true if method \a m1 is not equal to method \a m2,
|
||||||
|
@ -208,16 +208,13 @@ private:
|
|||||||
friend struct QMetaObject;
|
friend struct QMetaObject;
|
||||||
friend struct QMetaObjectPrivate;
|
friend struct QMetaObjectPrivate;
|
||||||
friend class QObject;
|
friend class QObject;
|
||||||
friend bool operator==(const QMetaMethod &m1, const QMetaMethod &m2);
|
friend bool operator==(const QMetaMethod &m1, const QMetaMethod &m2) noexcept
|
||||||
friend bool operator!=(const QMetaMethod &m1, const QMetaMethod &m2);
|
{ return m1.data == m2.data; }
|
||||||
|
friend bool operator!=(const QMetaMethod &m1, const QMetaMethod &m2) noexcept
|
||||||
|
{ return !(m1 == m2); }
|
||||||
};
|
};
|
||||||
Q_DECLARE_TYPEINFO(QMetaMethod, Q_MOVABLE_TYPE);
|
Q_DECLARE_TYPEINFO(QMetaMethod, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
inline bool operator==(const QMetaMethod &m1, const QMetaMethod &m2)
|
|
||||||
{ return m1.data == m2.data; }
|
|
||||||
inline bool operator!=(const QMetaMethod &m1, const QMetaMethod &m2)
|
|
||||||
{ return !(m1 == m2); }
|
|
||||||
|
|
||||||
class Q_CORE_EXPORT QMetaEnum
|
class Q_CORE_EXPORT QMetaEnum
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user