From a334156e81ab2491b3f65ee3c7a8269912c26a0c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 2 Apr 2019 15:44:01 +0200 Subject: Add QMetaProperty::relativePropertyIndex() Add a "sibling" function for QMetaProperty::propertyIndex() for the relative index. That way in QtQml we can avoid using propertyIndex() - metaObject.propertyOffset() where the latter traverses the parent chain. Change-Id: I113a956801b0e8d56a30a847b5b919da703824e2 Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- src/corelib/kernel/qmetaobject.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/kernel/qmetaobject.h') diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h index 51ace3d5f7..6c5f78d208 100644 --- a/src/corelib/kernel/qmetaobject.h +++ b/src/corelib/kernel/qmetaobject.h @@ -253,6 +253,7 @@ public: QVariant::Type type() const; int userType() const; int propertyIndex() const; + int relativePropertyIndex() const; bool isReadable() const; bool isWritable() const; -- cgit v1.2.3