summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobject.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-04-22 20:47:08 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-25 20:16:56 +0200
commit28c79d8c0bbe7d4316c52f0f6f5421c9aa724735 (patch)
tree0429012ccf81d45dbb4f6dcdb084ed275bd69302 /src/corelib/kernel/qmetaobject.cpp
parent6624151c6a8772a3f01a291f744ea72b469106fc (diff)
Add comparison operators == and != for QMetaMethod
This is done in preparation of introducing the QObject::connectNotify(QMetaMethod) function. Together with the forthcoming QMetaMethod::fromSignal() function, which returns the QMetaMethod corresponding to a Qt/C++ signal (member function), the comparison operators provide an effective way of checking which signal was connected to. Change-Id: I2de48628c4884a7174fb8574895f272cb3fe5634 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
-rw-r--r--src/corelib/kernel/qmetaobject.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 2439c22f74..359dbfcf23 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -1477,6 +1477,24 @@ bool QMetaObject::invokeMethod(QObject *obj,
invoked), otherwise returns false.
*/
+/*! \fn bool operator==(const QMetaMethod &m1, const QMetaMethod &m2)
+ \since 5.0
+ \relates QMetaMethod
+ \overload
+
+ Returns true if method \a m1 is equal to method \a m2,
+ otherwise returns false.
+*/
+
+/*! \fn bool operator!=(const QMetaMethod &m1, const QMetaMethod &m2)
+ \since 5.0
+ \relates QMetaMethod
+ \overload
+
+ Returns true if method \a m1 is not equal to method \a m2,
+ otherwise returns false.
+*/
+
/*!
\fn const QMetaObject *QMetaMethod::enclosingMetaObject() const
\internal