diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-07-22 10:08:17 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-08-04 12:11:05 +0000 |
commit | 1534dd6d97c49f5c7e0392df9c95198311b5b817 (patch) | |
tree | dad42c0c12c0ef3005b26645df6cc21832f54315 /src/qml/qml/qqmlvmemetaobject_p.h | |
parent | fdc3dcd43f8944eb33e778627c43ab9487a26960 (diff) |
QML: Introduce QQmlPropertyIndex
This helps in making it clear when an index is a plain old number and
when it consists of an encoded value type index.
Change-Id: Ic50d95caf244ed0ee2d62bdba53910a371cfee04
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject_p.h')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index 4a81fc50d2..031bfdfb9b 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -97,7 +97,7 @@ public: QQmlInterceptorMetaObject(QObject *obj, QQmlPropertyCache *cache); ~QQmlInterceptorMetaObject(); - void registerInterceptor(int index, int valueIndex, QQmlPropertyValueInterceptor *interceptor); + void registerInterceptor(QQmlPropertyIndex index, QQmlPropertyValueInterceptor *interceptor); static QQmlInterceptorMetaObject *get(QObject *obj); @@ -106,10 +106,10 @@ public: // Used by auto-tests for inspection QQmlPropertyCache *propertyCache() const { return cache; } - bool intercepts(int coreIndex) const + bool intercepts(QQmlPropertyIndex propertyIndex) const { for (auto it = interceptors; it; it = it->m_next) { - if (it->m_coreIndex == coreIndex) + if (it->m_propertyIndex == propertyIndex) return true; } return false; |