diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-08-01 10:27:17 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-10 05:40:49 +0200 |
commit | 4350877d6deb58f36df24164c6edde3302a3f1a3 (patch) | |
tree | 5b1b121c1ce21aff1717de500282a5951f4e1267 /src/qml/qml/qqmlvmemetaobject_p.h | |
parent | 34ae6deb78c30a80570e0c0dda7b2f071abdbf68 (diff) |
Permit value types with metatype IDs >= QMetaType::User
Remove the assumption that value types must be types defined by
Qt, having metatype IDs below QMetaType::User.
Task-number: QTBUG-26352
Change-Id: Ib5a56ff2e7892e82adf17a3a1e7517a0c9fe0534
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject_p.h')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject_p.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index 5751989b0c..4216e09733 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -90,6 +90,7 @@ struct QQmlVMEMetaData struct AliasData { int contextIdx; int propertyIdx; + int propType; int flags; int notifySignal; @@ -97,19 +98,19 @@ struct QQmlVMEMetaData return propertyIdx == -1; } bool isPropertyAlias() const { - return !isObjectAlias() && !(propertyIdx & 0xFF000000); + return !isObjectAlias() && !(propertyIdx & 0xFFFF0000); } bool isValueTypeAlias() const { - return !isObjectAlias() && (propertyIdx & 0xFF000000); + return !isObjectAlias() && (propertyIdx & 0xFFFF0000); } int propertyIndex() const { return propertyIdx & 0x0000FFFF; } int valueTypeIndex() const { - return (propertyIdx & 0x00FF0000) >> 16; + return (propertyIdx & 0xFFFF0000) >> 16; } int valueType() const { - return ((unsigned int)propertyIdx) >> 24; + return (propertyIdx & 0xFFFF0000) ? propType : 0; } }; |