summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobject.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-04-02 15:44:01 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-04-04 14:39:31 +0000
commita334156e81ab2491b3f65ee3c7a8269912c26a0c (patch)
tree1993f68b7363108e7d2f18772428cbee9c3b423a /src/corelib/kernel/qmetaobject.h
parent90c86d738e0f36eaa48c7f81f6f5cc035a339d6b (diff)
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 <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.h')
-rw-r--r--src/corelib/kernel/qmetaobject.h1
1 files changed, 1 insertions, 0 deletions
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;