aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal_p.h
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2012-04-23 10:17:57 +1000
committerQt by Nokia <qt-info@nokia.com>2012-04-23 05:23:34 +0200
commit9542511b013588b2ceb132ec8b34879ec904a21e (patch)
tree9fe2b2996878c14f61d54561f16ce64bbe096958 /src/qml/qml/qqmlboundsignal_p.h
parent6d2ed5d0b645f5af383a123e869d061b235b4b85 (diff)
Support and use parameters in QQmlNotifierEndpoint.
Allow QQmlNotifierEndpoint to support signals with parameters. Update QQmlBoundSignal to use this support. Change-Id: Ie2a245b39283b0b66d66bd2350e8bc85fe519bb5 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal_p.h')
-rw-r--r--src/qml/qml/qqmlboundsignal_p.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h
index c6ce875d07..e4115886ba 100644
--- a/src/qml/qml/qqmlboundsignal_p.h
+++ b/src/qml/qml/qqmlboundsignal_p.h
@@ -57,6 +57,7 @@
#include <private/qqmlabstractexpression_p.h>
#include <private/qqmljavascriptexpression_p.h>
+#include <private/qqmlnotifier_p.h>
#include <private/qobject_p.h>
QT_BEGIN_NAMESPACE
@@ -109,6 +110,7 @@ public:
virtual QQmlBoundSignalExpression *setExpression(QQmlBoundSignalExpression *) = 0;
virtual QObject *scope() = 0;
+ void removeFromObject();
protected:
void addToObject(QObject *owner);
@@ -121,8 +123,8 @@ private:
};
class QQmlBoundSignalParameters;
-class Q_QML_EXPORT QQmlBoundSignal : public QObject,
- public QQmlAbstractBoundSignal
+class Q_QML_EXPORT QQmlBoundSignal : public QQmlAbstractBoundSignal,
+ public QQmlNotifierEndpoint
{
public:
QQmlBoundSignal(QObject *scope, const QMetaMethod &signal, QObject *owner);
@@ -134,20 +136,20 @@ public:
QQmlBoundSignalExpression *setExpression(QQmlBoundSignalExpression *);
QObject *scope() { return m_scope; }
- bool isEvaluating() const { return m_isEvaluating; }
+ static void subscriptionCallback(QQmlNotifierEndpoint *e, void **);
-protected:
- virtual int qt_metacall(QMetaObject::Call c, int id, void **a);
+ bool isEvaluating() const { return m_isEvaluating; }
private:
QQmlBoundSignalExpression *m_expression;
QQmlBoundSignalParameters *m_params;
QObject *m_scope;
- QMetaMethod m_signal;
+ int m_index;
bool m_paramsValid : 1;
bool m_isEvaluating : 1;
};
+
QT_END_NAMESPACE
#endif // QQMLBOUNDSIGNAL_P_H