summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2012-07-18 15:17:20 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-24 04:23:45 +0200
commitf83954c6310cba1529017601bf88a82e2a16ec94 (patch)
tree90892fd3d960558c8821815bac8d509e06f4272c /src
parentd4c241a98059edaa7a4b15beb1cfd16ed041284e (diff)
Provide access to (dis)connectNotify() from other objects.
This is the first step to fix (dis)connectNotify() not getting called for QML signal handlers and bindings. Change-Id: I5cfc126a5562a20031d3af8415c60d101603dd8d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qobject_p.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index 446e920875..02580caf41 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -193,6 +193,11 @@ public:
int signalIndex(const char *signalName, const QMetaObject **meta = 0) const;
inline bool isSignalConnected(uint signalIdx) const;
+ // To allow abitrary objects to call connectNotify()/disconnectNotify() without making
+ // the API public in QObject. This is used by QQmlNotifierEndpoint.
+ inline void connectNotify(const QMetaMethod &signal);
+ inline void disconnectNotify(const QMetaMethod &signal);
+
public:
ExtraData *extraData; // extra data set by the user
QThreadData *threadData; // id of the thread that owns the object
@@ -252,6 +257,16 @@ inline void QObjectPrivate::resetCurrentSender(QObject *receiver,
previousSender->ref = currentSender->ref;
}
+inline void QObjectPrivate::connectNotify(const QMetaMethod &signal)
+{
+ q_ptr->connectNotify(signal);
+}
+
+inline void QObjectPrivate::disconnectNotify(const QMetaMethod &signal)
+{
+ q_ptr->disconnectNotify(signal);
+}
+
Q_DECLARE_TYPEINFO(QObjectPrivate::Connection, Q_MOVABLE_TYPE);
Q_DECLARE_TYPEINFO(QObjectPrivate::Sender, Q_MOVABLE_TYPE);