summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobjectdefs.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-06-06 13:51:19 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-07 16:19:05 +0200
commitd8a6a67579fe5f3a6b70b6774b6eee00a55834d5 (patch)
tree5108cb24eee120e28817746086d4d9873e3147d4 /src/corelib/kernel/qobjectdefs.h
parentaff03cbc276357b4db412ec8f8368e723f2a6277 (diff)
Add internal functions to QObjectPrivate for signal & slot connections in QML
In QML it is common to connect signals to slots that are implemented as JavaScript functions. QML used to maintain separate data structures that mirrored the QObject connection list and kept references to the JavaScript objects necessary to perform the call on signal activation. The recent addition of functor based QObject::connect makes it possible to store this information in QSlotObjectBase sub-class instead, which eliminates any extra bookkeeping. This patch adds internal connect and disconnect overloads to QObjectPrivate that allow for connecting QObject *sender, int signalIndex to a given QSlotObjectBase and similar for disconnect. Change-Id: I90f43d13eb95bd884d752484cf4faacc446f4d6a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel/qobjectdefs.h')
-rw-r--r--src/corelib/kernel/qobjectdefs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index afbe1a5ece..c489344b10 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -456,6 +456,7 @@ class Q_CORE_EXPORT QMetaObject::Connection {
void *d_ptr; //QObjectPrivate::Connection*
explicit Connection(void *data) : d_ptr(data) { }
friend class QObject;
+ friend class QObjectPrivate;
friend struct QMetaObject;
public:
~Connection();