summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.h
diff options
context:
space:
mode:
authorSergey Vidyuk <sir.vestnik@gmail.com>2010-06-18 12:44:07 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-06-18 12:44:53 (GMT)
commit4a2ba043ed09375e4d9423def32084ab97ea560a (patch)
treef4a1bcd41589cf122fb6afea9602952b3bbb42ab /src/corelib/kernel/qobject.h
parentfb23b6893d5228d3716ed0899ef089aeeafec3bf (diff)
downloadQt-4a2ba043ed09375e4d9423def32084ab97ea560a.zip
Qt-4a2ba043ed09375e4d9423def32084ab97ea560a.tar.gz
Qt-4a2ba043ed09375e4d9423def32084ab97ea560a.tar.bz2
Added QObject::connect overload taking QMetaMethod as parameter
Added QObject::connect() and QObject::disconnect() functions implementations which use QMetaMethod to specify signals and slots to be connected or disconnected. Merge-request: 636 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com> Task-number: QTBUG-10637
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r--src/corelib/kernel/qobject.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 44e7ce5..d26f078 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -207,6 +207,21 @@ public:
#endif
#endif
);
+
+ static bool connect(const QObject *sender, const QMetaMethod &signal,
+ const QObject *receiver, const QMetaMethod &method,
+ Qt::ConnectionType type =
+#ifdef qdoc
+ Qt::AutoConnection
+#else
+#ifdef QT3_SUPPORT
+ Qt::AutoCompatConnection
+#else
+ Qt::AutoConnection
+#endif
+#endif
+ );
+
inline bool connect(const QObject *sender, const char *signal,
const char *member, Qt::ConnectionType type =
#ifdef qdoc
@@ -222,6 +237,8 @@ public:
static bool disconnect(const QObject *sender, const char *signal,
const QObject *receiver, const char *member);
+ static bool disconnect(const QObject *sender, const QMetaMethod &signal,
+ const QObject *receiver, const QMetaMethod &member);
inline bool disconnect(const char *signal = 0,
const QObject *receiver = 0, const char *member = 0)
{ return disconnect(this, signal, receiver, member); }