summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/kernel/qmetaobject.cpp6
-rw-r--r--src/corelib/kernel/qmetaobject.h11
2 files changed, 6 insertions, 11 deletions
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 3ac7e478e2..6b6e2b0912 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -1640,18 +1640,16 @@ bool QMetaObject::invokeMethodImpl(QObject *object, QtPrivate::QSlotObjectBase *
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
- \relates QMetaMethod
\overload
Returns \c true if method \a m1 is equal to method \a m2,
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
- \relates QMetaMethod
\overload
Returns \c true if method \a m1 is not equal to method \a m2,
diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h
index 629d6c1891..ca30815ec1 100644
--- a/src/corelib/kernel/qmetaobject.h
+++ b/src/corelib/kernel/qmetaobject.h
@@ -208,16 +208,13 @@ private:
friend struct QMetaObject;
friend struct QMetaObjectPrivate;
friend class QObject;
- friend bool operator==(const QMetaMethod &m1, const QMetaMethod &m2);
- friend bool operator!=(const QMetaMethod &m1, const QMetaMethod &m2);
+ friend bool operator==(const QMetaMethod &m1, const QMetaMethod &m2) noexcept
+ { 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);
-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
{
public: