From 1534dd6d97c49f5c7e0392df9c95198311b5b817 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 22 Jul 2016 10:08:17 +0200 Subject: 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 --- src/qml/qml/qqmlvmemetaobject_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/qml/qqmlvmemetaobject_p.h') 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; -- cgit v1.2.3