diff options
author | Erik Verbruggen <[email protected]> | 2016-07-22 10:08:17 +0200 |
---|---|---|
committer | Erik Verbruggen <[email protected]> | 2016-08-04 12:11:05 +0000 |
commit | 1534dd6d97c49f5c7e0392df9c95198311b5b817 (patch) | |
tree | dad42c0c12c0ef3005b26645df6cc21832f54315 /src/qml/compiler/qqmlpropertycachecreator_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 <[email protected]>
Diffstat (limited to 'src/qml/compiler/qqmlpropertycachecreator_p.h')
-rw-r--r-- | src/qml/compiler/qqmlpropertycachecreator_p.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/compiler/qqmlpropertycachecreator_p.h b/src/qml/compiler/qqmlpropertycachecreator_p.h index 09a093d911..fe10085829 100644 --- a/src/qml/compiler/qqmlpropertycachecreator_p.h +++ b/src/qml/compiler/qqmlpropertycachecreator_p.h @@ -576,8 +576,7 @@ inline void QQmlPropertyCacheAliasCreator<ObjectContainer>::appendAliasPropertie const QQmlPropertyCache *targetCache = propertyCaches->at(targetObjectIndex); Q_ASSERT(targetCache); - int coreIndex; - QQmlPropertyData::decodeValueTypePropertyIndex(alias->encodedMetaPropertyIndex, &coreIndex); + int coreIndex = QQmlPropertyIndex::fromEncoded(alias->encodedMetaPropertyIndex).coreIndex(); QQmlPropertyData *targetProperty = targetCache->property(coreIndex); if (!targetProperty) return false; @@ -655,8 +654,8 @@ inline void QQmlPropertyCacheAliasCreator<ObjectContainer>::propertyDataForAlias *propertyFlags |= QQmlPropertyData::IsQObjectDerived; } else { - int coreIndex; - int valueTypeIndex = QQmlPropertyData::decodeValueTypePropertyIndex(alias.encodedMetaPropertyIndex, &coreIndex); + int coreIndex = QQmlPropertyIndex::fromEncoded(alias.encodedMetaPropertyIndex).coreIndex(); + int valueTypeIndex = QQmlPropertyIndex::fromEncoded(alias.encodedMetaPropertyIndex).valueTypeIndex(); QQmlPropertyCache *targetCache = propertyCaches->at(targetObjectIndex); Q_ASSERT(targetCache); |