diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-06-03 21:10:32 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-12 12:06:09 +0200 |
commit | c421281a0291fd48c616a6e37315364ce0553c0f (patch) | |
tree | da71d664288d4aaaf3836a03c0c1d645a81670ea /src/qml/qml/qqmlvmemetaobject_p.h | |
parent | f4a683f6874b03ce3e0a2869320a9956d5a04098 (diff) |
Adapt to connection-related changes in qtbase
The QQmlData hooks signalEmitted() and receivers() now receive the
index in the signal index range (i.e., excluding non-signal methods).
This was done to avoid Q(Meta)Object having to compute the class's
method offset; the signal offset should be sufficient for everyone.
This required adapting QQmlNotifier, QQmlBoundSignal,
QQmlPropertyCache and friends to use the signal index range whenever
a property's notify signal is involved in the internal connection
lists and property captures.
Using the signal index range also reduces the memory used for
NotifyList::notifies, since useless entries for non-signal methods
will no longer be created.
Change-Id: I62872fbea5a1f829b8b03bae3fc1e6acd84cf886
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject_p.h')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index 77e300d71a..7a01b70b06 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -169,13 +169,14 @@ public: v8::Handle<v8::Value> vmeProperty(int index); void setVMEProperty(int index, v8::Handle<v8::Value> v); - void connectAliasSignal(int index); + void connectAliasSignal(int index, bool indexInSignalRange); virtual QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *o); static inline QQmlVMEMetaObject *get(QObject *o); static QQmlVMEMetaObject *getForProperty(QObject *o, int coreIndex); static QQmlVMEMetaObject *getForMethod(QObject *o, int coreIndex); + static QQmlVMEMetaObject *getForSignal(QObject *o, int coreIndex); protected: virtual int metaCall(QMetaObject::Call _c, int _id, void **_a); @@ -191,6 +192,7 @@ public: const QQmlVMEMetaData *metaData; inline int propOffset() const; inline int methodOffset() const; + inline int signalOffset() const; bool hasAssignedMetaObjectData; QQmlVMEVariant *data; @@ -262,6 +264,11 @@ int QQmlVMEMetaObject::methodOffset() const return cache->methodOffset(); } +int QQmlVMEMetaObject::signalOffset() const +{ + return cache->signalOffset(); +} + QT_END_NAMESPACE #endif // QQMLVMEMETAOBJECT_P_H |