diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-07-04 16:26:16 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-07-05 16:31:56 +0200 |
commit | c2916f627373ae79bfe1407d1b7c2b41d06989eb (patch) | |
tree | dc2602796facefa5975964030366a182e58a9312 /src/qml | |
parent | e203418096e66f2173d05788e5cb18e79141e772 (diff) |
Minor internal API cleanup
Move Property::Type out into a standalone BuiltinType enum class, as
it's also used in the signal parameters (and more in the future).
Change-Id: I1125c954f6e45c7a1ce6fe2aae77c5f0e68455f5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 42 | ||||
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 20 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycachecreator.cpp | 44 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycachecreator_p.h | 14 | ||||
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject.cpp | 92 |
5 files changed, 107 insertions, 105 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index 6c61473418..1891f31f13 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -767,33 +767,33 @@ bool IRBuilder::visit(QQmlJS::AST::UiPublicMember *node) static const struct TypeNameToType { const char *name; size_t nameLength; - QV4::CompiledData::Property::Type type; + QV4::CompiledData::BuiltinType type; } propTypeNameToTypes[] = { - { "int", strlen("int"), QV4::CompiledData::Property::Int }, - { "bool", strlen("bool"), QV4::CompiledData::Property::Bool }, - { "double", strlen("double"), QV4::CompiledData::Property::Real }, - { "real", strlen("real"), QV4::CompiledData::Property::Real }, - { "string", strlen("string"), QV4::CompiledData::Property::String }, - { "url", strlen("url"), QV4::CompiledData::Property::Url }, - { "color", strlen("color"), QV4::CompiledData::Property::Color }, + { "int", strlen("int"), QV4::CompiledData::BuiltinType::Int }, + { "bool", strlen("bool"), QV4::CompiledData::BuiltinType::Bool }, + { "double", strlen("double"), QV4::CompiledData::BuiltinType::Real }, + { "real", strlen("real"), QV4::CompiledData::BuiltinType::Real }, + { "string", strlen("string"), QV4::CompiledData::BuiltinType::String }, + { "url", strlen("url"), QV4::CompiledData::BuiltinType::Url }, + { "color", strlen("color"), QV4::CompiledData::BuiltinType::Color }, // Internally QTime, QDate and QDateTime are all supported. // To be more consistent with JavaScript we expose only // QDateTime as it matches closely with the Date JS type. // We also call it "date" to match. // { "time", strlen("time"), Property::Time }, // { "date", strlen("date"), Property::Date }, - { "date", strlen("date"), QV4::CompiledData::Property::DateTime }, - { "rect", strlen("rect"), QV4::CompiledData::Property::Rect }, - { "point", strlen("point"), QV4::CompiledData::Property::Point }, - { "size", strlen("size"), QV4::CompiledData::Property::Size }, - { "font", strlen("font"), QV4::CompiledData::Property::Font }, - { "vector2d", strlen("vector2d"), QV4::CompiledData::Property::Vector2D }, - { "vector3d", strlen("vector3d"), QV4::CompiledData::Property::Vector3D }, - { "vector4d", strlen("vector4d"), QV4::CompiledData::Property::Vector4D }, - { "quaternion", strlen("quaternion"), QV4::CompiledData::Property::Quaternion }, - { "matrix4x4", strlen("matrix4x4"), QV4::CompiledData::Property::Matrix4x4 }, - { "variant", strlen("variant"), QV4::CompiledData::Property::Variant }, - { "var", strlen("var"), QV4::CompiledData::Property::Var } + { "date", strlen("date"), QV4::CompiledData::BuiltinType::DateTime }, + { "rect", strlen("rect"), QV4::CompiledData::BuiltinType::Rect }, + { "point", strlen("point"), QV4::CompiledData::BuiltinType::Point }, + { "size", strlen("size"), QV4::CompiledData::BuiltinType::Size }, + { "font", strlen("font"), QV4::CompiledData::BuiltinType::Font }, + { "vector2d", strlen("vector2d"), QV4::CompiledData::BuiltinType::Vector2D }, + { "vector3d", strlen("vector3d"), QV4::CompiledData::BuiltinType::Vector3D }, + { "vector4d", strlen("vector4d"), QV4::CompiledData::BuiltinType::Vector4D }, + { "quaternion", strlen("quaternion"), QV4::CompiledData::BuiltinType::Quaternion }, + { "matrix4x4", strlen("matrix4x4"), QV4::CompiledData::BuiltinType::Matrix4x4 }, + { "variant", strlen("variant"), QV4::CompiledData::BuiltinType::Variant }, + { "var", strlen("var"), QV4::CompiledData::BuiltinType::Var } }; static const int propTypeNameToTypesCount = sizeof(propTypeNameToTypes) / sizeof(propTypeNameToTypes[0]); @@ -845,7 +845,7 @@ bool IRBuilder::visit(QQmlJS::AST::UiPublicMember *node) } else { // the parameter is a known basic type param->indexIsBuiltinType = true; - param->typeNameIndexOrBuiltinType = type->type; + param->typeNameIndexOrBuiltinType = static_cast<quint32>(type->type); Q_ASSERT(quint32(type->type) < (1u << 31)); } diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index 639595509a..f3d5de3db1 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -602,6 +602,12 @@ struct Enum }; static_assert(sizeof(Enum) == 12, "Enum structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target"); +enum class BuiltinType : unsigned int { + Var = 0, Variant, Int, Bool, Real, String, Url, Color, + Font, Time, Date, DateTime, Rect, Point, Size, + Vector2D, Vector3D, Vector4D, Matrix4x4, Quaternion, InvalidBuiltin +}; + struct Parameter { quint32_le nameIndex; @@ -640,10 +646,6 @@ static_assert(sizeof(Signal) == 12, "Signal structure needs to have the expected struct Property { - enum Type : unsigned int { Var = 0, Variant, Int, Bool, Real, String, Url, Color, - Font, Time, Date, DateTime, Rect, Point, Size, - Vector2D, Vector3D, Vector4D, Matrix4x4, Quaternion, InvalidBuiltin }; - quint32_le nameIndex; union { quint32_le_bitfield<0, 29> builtinTypeOrTypeNameIndex; @@ -654,15 +656,15 @@ struct Property Location location; - void setBuiltinType(Type t) + void setBuiltinType(BuiltinType t) { - builtinTypeOrTypeNameIndex = t; + builtinTypeOrTypeNameIndex = static_cast<quint32>(t); isBuiltinType = true; } - Type builtinType() const { + BuiltinType builtinType() const { if (isBuiltinType) - return static_cast<Type>(quint32(builtinTypeOrTypeNameIndex)); - return InvalidBuiltin; + return static_cast<BuiltinType>(quint32(builtinTypeOrTypeNameIndex)); + return BuiltinType::InvalidBuiltin; } void setCustomType(int nameIndex) { diff --git a/src/qml/qml/qqmlpropertycachecreator.cpp b/src/qml/qml/qqmlpropertycachecreator.cpp index 6e492f7a80..034ebfc743 100644 --- a/src/qml/qml/qqmlpropertycachecreator.cpp +++ b/src/qml/qml/qqmlpropertycachecreator.cpp @@ -46,30 +46,30 @@ QT_BEGIN_NAMESPACE QAtomicInt QQmlPropertyCacheCreatorBase::classIndexCounter(0); -int QQmlPropertyCacheCreatorBase::metaTypeForPropertyType(QV4::CompiledData::Property::Type type) +int QQmlPropertyCacheCreatorBase::metaTypeForPropertyType(QV4::CompiledData::BuiltinType type) { switch (type) { - case QV4::CompiledData::Property::Var: return QMetaType::QVariant; - case QV4::CompiledData::Property::Variant: return QMetaType::QVariant; - case QV4::CompiledData::Property::Int: return QMetaType::Int; - case QV4::CompiledData::Property::Bool: return QMetaType::Bool; - case QV4::CompiledData::Property::Real: return QMetaType::Double; - case QV4::CompiledData::Property::String: return QMetaType::QString; - case QV4::CompiledData::Property::Url: return QMetaType::QUrl; - case QV4::CompiledData::Property::Color: return QMetaType::QColor; - case QV4::CompiledData::Property::Font: return QMetaType::QFont; - case QV4::CompiledData::Property::Time: return QMetaType::QTime; - case QV4::CompiledData::Property::Date: return QMetaType::QDate; - case QV4::CompiledData::Property::DateTime: return QMetaType::QDateTime; - case QV4::CompiledData::Property::Rect: return QMetaType::QRectF; - case QV4::CompiledData::Property::Point: return QMetaType::QPointF; - case QV4::CompiledData::Property::Size: return QMetaType::QSizeF; - case QV4::CompiledData::Property::Vector2D: return QMetaType::QVector2D; - case QV4::CompiledData::Property::Vector3D: return QMetaType::QVector3D; - case QV4::CompiledData::Property::Vector4D: return QMetaType::QVector4D; - case QV4::CompiledData::Property::Matrix4x4: return QMetaType::QMatrix4x4; - case QV4::CompiledData::Property::Quaternion: return QMetaType::QQuaternion; - case QV4::CompiledData::Property::InvalidBuiltin: break; + case QV4::CompiledData::BuiltinType::Var: return QMetaType::QVariant; + case QV4::CompiledData::BuiltinType::Variant: return QMetaType::QVariant; + case QV4::CompiledData::BuiltinType::Int: return QMetaType::Int; + case QV4::CompiledData::BuiltinType::Bool: return QMetaType::Bool; + case QV4::CompiledData::BuiltinType::Real: return QMetaType::Double; + case QV4::CompiledData::BuiltinType::String: return QMetaType::QString; + case QV4::CompiledData::BuiltinType::Url: return QMetaType::QUrl; + case QV4::CompiledData::BuiltinType::Color: return QMetaType::QColor; + case QV4::CompiledData::BuiltinType::Font: return QMetaType::QFont; + case QV4::CompiledData::BuiltinType::Time: return QMetaType::QTime; + case QV4::CompiledData::BuiltinType::Date: return QMetaType::QDate; + case QV4::CompiledData::BuiltinType::DateTime: return QMetaType::QDateTime; + case QV4::CompiledData::BuiltinType::Rect: return QMetaType::QRectF; + case QV4::CompiledData::BuiltinType::Point: return QMetaType::QPointF; + case QV4::CompiledData::BuiltinType::Size: return QMetaType::QSizeF; + case QV4::CompiledData::BuiltinType::Vector2D: return QMetaType::QVector2D; + case QV4::CompiledData::BuiltinType::Vector3D: return QMetaType::QVector3D; + case QV4::CompiledData::BuiltinType::Vector4D: return QMetaType::QVector4D; + case QV4::CompiledData::BuiltinType::Matrix4x4: return QMetaType::QMatrix4x4; + case QV4::CompiledData::BuiltinType::Quaternion: return QMetaType::QQuaternion; + case QV4::CompiledData::BuiltinType::InvalidBuiltin: break; }; return QMetaType::UnknownType; } diff --git a/src/qml/qml/qqmlpropertycachecreator_p.h b/src/qml/qml/qqmlpropertycachecreator_p.h index 5421e2c61b..14f734277d 100644 --- a/src/qml/qml/qqmlpropertycachecreator_p.h +++ b/src/qml/qml/qqmlpropertycachecreator_p.h @@ -85,7 +85,7 @@ struct QQmlPropertyCacheCreatorBase public: static QAtomicInt classIndexCounter; - static int metaTypeForPropertyType(QV4::CompiledData::Property::Type type); + static int metaTypeForPropertyType(QV4::CompiledData::BuiltinType type); }; template <typename ObjectContainer> @@ -304,7 +304,7 @@ inline QQmlJS::DiagnosticMessage QQmlPropertyCacheCreator<ObjectContainer>::crea auto p = obj->propertiesBegin(); auto pend = obj->propertiesEnd(); for ( ; p != pend; ++p) { - if (p->builtinType() == QV4::CompiledData::Property::Var) + if (p->builtinType() == QV4::CompiledData::BuiltinType::Var) varPropCount++; bool notInRevision = false; @@ -406,7 +406,7 @@ inline QQmlJS::DiagnosticMessage QQmlPropertyCacheCreator<ObjectContainer>::crea names.append(stringAt(param->nameIndex).toUtf8()); if (param->indexIsBuiltinType) { // built-in type - paramTypes[i + 1] = metaTypeForPropertyType(static_cast<QV4::CompiledData::Property::Type>(int(param->typeNameIndexOrBuiltinType))); + paramTypes[i + 1] = metaTypeForPropertyType(static_cast<QV4::CompiledData::BuiltinType>(int(param->typeNameIndexOrBuiltinType))); } else { // lazily resolved type const QString customTypeName = stringAt(param->typeNameIndexOrBuiltinType); @@ -477,16 +477,16 @@ inline QQmlJS::DiagnosticMessage QQmlPropertyCacheCreator<ObjectContainer>::crea int propertTypeMinorVersion = 0; QQmlPropertyData::Flags propertyFlags; - const QV4::CompiledData::Property::Type type = p->builtinType(); + const QV4::CompiledData::BuiltinType type = p->builtinType(); - if (type == QV4::CompiledData::Property::Var) + if (type == QV4::CompiledData::BuiltinType::Var) propertyFlags.type = QQmlPropertyData::Flags::VarPropertyType; - if (type != QV4::CompiledData::Property::InvalidBuiltin) { + if (type != QV4::CompiledData::BuiltinType::InvalidBuiltin) { propertyType = metaTypeForPropertyType(type); - if (type == QV4::CompiledData::Property::Variant) + if (type == QV4::CompiledData::BuiltinType::Variant) propertyFlags.type = QQmlPropertyData::Flags::QVariantType; } else { Q_ASSERT(!p->isBuiltinType); diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index d210b049df..458f26b465 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -640,7 +640,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * if (id < propertyCount) { const QV4::CompiledData::Property &property = compiledObject->propertyTable()[id]; - const QV4::CompiledData::Property::Type t = property.builtinType(); + const QV4::CompiledData::BuiltinType t = property.builtinType(); // the context can be null if accessing var properties from cpp after re-parenting an item. QQmlEnginePrivate *ep = (ctxt == nullptr || ctxt->engine == nullptr) ? nullptr : QQmlEnginePrivate::get(ctxt->engine); @@ -649,47 +649,47 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * if (c == QMetaObject::ReadProperty) { switch (t) { - case QV4::CompiledData::Property::Int: + case QV4::CompiledData::BuiltinType::Int: *reinterpret_cast<int *>(a[0]) = readPropertyAsInt(id); break; - case QV4::CompiledData::Property::Bool: + case QV4::CompiledData::BuiltinType::Bool: *reinterpret_cast<bool *>(a[0]) = readPropertyAsBool(id); break; - case QV4::CompiledData::Property::Real: + case QV4::CompiledData::BuiltinType::Real: *reinterpret_cast<double *>(a[0]) = readPropertyAsDouble(id); break; - case QV4::CompiledData::Property::String: + case QV4::CompiledData::BuiltinType::String: *reinterpret_cast<QString *>(a[0]) = readPropertyAsString(id); break; - case QV4::CompiledData::Property::Url: + case QV4::CompiledData::BuiltinType::Url: *reinterpret_cast<QUrl *>(a[0]) = readPropertyAsUrl(id); break; - case QV4::CompiledData::Property::Date: + case QV4::CompiledData::BuiltinType::Date: *reinterpret_cast<QDate *>(a[0]) = readPropertyAsDate(id); break; - case QV4::CompiledData::Property::DateTime: + case QV4::CompiledData::BuiltinType::DateTime: *reinterpret_cast<QDateTime *>(a[0]) = readPropertyAsDateTime(id); break; - case QV4::CompiledData::Property::Rect: + case QV4::CompiledData::BuiltinType::Rect: *reinterpret_cast<QRectF *>(a[0]) = readPropertyAsRectF(id); break; - case QV4::CompiledData::Property::Size: + case QV4::CompiledData::BuiltinType::Size: *reinterpret_cast<QSizeF *>(a[0]) = readPropertyAsSizeF(id); break; - case QV4::CompiledData::Property::Point: + case QV4::CompiledData::BuiltinType::Point: *reinterpret_cast<QPointF *>(a[0]) = readPropertyAsPointF(id); break; - case QV4::CompiledData::Property::Variant: + case QV4::CompiledData::BuiltinType::Variant: *reinterpret_cast<QVariant *>(a[0]) = readPropertyAsVariant(id); break; - case QV4::CompiledData::Property::Font: - case QV4::CompiledData::Property::Time: - case QV4::CompiledData::Property::Color: - case QV4::CompiledData::Property::Vector2D: - case QV4::CompiledData::Property::Vector3D: - case QV4::CompiledData::Property::Vector4D: - case QV4::CompiledData::Property::Matrix4x4: - case QV4::CompiledData::Property::Quaternion: + case QV4::CompiledData::BuiltinType::Font: + case QV4::CompiledData::BuiltinType::Time: + case QV4::CompiledData::BuiltinType::Color: + case QV4::CompiledData::BuiltinType::Vector2D: + case QV4::CompiledData::BuiltinType::Vector3D: + case QV4::CompiledData::BuiltinType::Vector4D: + case QV4::CompiledData::BuiltinType::Matrix4x4: + case QV4::CompiledData::BuiltinType::Quaternion: Q_ASSERT(fallbackMetaType != QMetaType::UnknownType); if (QV4::MemberData *md = propertyAndMethodStorageAsMemberData()) { QVariant propertyAsVariant; @@ -698,7 +698,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * QQml_valueTypeProvider()->readValueType(propertyAsVariant, a[0], fallbackMetaType); } break; - case QV4::CompiledData::Property::Var: + case QV4::CompiledData::BuiltinType::Var: if (ep) { *reinterpret_cast<QVariant *>(a[0]) = readPropertyAsVariant(id); } else { @@ -706,7 +706,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * *reinterpret_cast<QVariant *>(a[0]) = QVariant(); } break; - case QV4::CompiledData::Property::InvalidBuiltin: + case QV4::CompiledData::BuiltinType::InvalidBuiltin: if (property.isList) { QList<QObject *> *list = readPropertyAsList(id); QQmlListProperty<QObject> *p = static_cast<QQmlListProperty<QObject> *>(a[0]); @@ -723,57 +723,57 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * } else if (c == QMetaObject::WriteProperty) { bool needActivate = false; switch (t) { - case QV4::CompiledData::Property::Int: + case QV4::CompiledData::BuiltinType::Int: needActivate = *reinterpret_cast<int *>(a[0]) != readPropertyAsInt(id); writeProperty(id, *reinterpret_cast<int *>(a[0])); break; - case QV4::CompiledData::Property::Bool: + case QV4::CompiledData::BuiltinType::Bool: needActivate = *reinterpret_cast<bool *>(a[0]) != readPropertyAsBool(id); writeProperty(id, *reinterpret_cast<bool *>(a[0])); break; - case QV4::CompiledData::Property::Real: + case QV4::CompiledData::BuiltinType::Real: needActivate = *reinterpret_cast<double *>(a[0]) != readPropertyAsDouble(id); writeProperty(id, *reinterpret_cast<double *>(a[0])); break; - case QV4::CompiledData::Property::String: + case QV4::CompiledData::BuiltinType::String: needActivate = *reinterpret_cast<QString *>(a[0]) != readPropertyAsString(id); writeProperty(id, *reinterpret_cast<QString *>(a[0])); break; - case QV4::CompiledData::Property::Url: + case QV4::CompiledData::BuiltinType::Url: needActivate = *reinterpret_cast<QUrl *>(a[0]) != readPropertyAsUrl(id); writeProperty(id, *reinterpret_cast<QUrl *>(a[0])); break; - case QV4::CompiledData::Property::Date: + case QV4::CompiledData::BuiltinType::Date: needActivate = *reinterpret_cast<QDate *>(a[0]) != readPropertyAsDate(id); writeProperty(id, *reinterpret_cast<QDate *>(a[0])); break; - case QV4::CompiledData::Property::DateTime: + case QV4::CompiledData::BuiltinType::DateTime: needActivate = *reinterpret_cast<QDateTime *>(a[0]) != readPropertyAsDateTime(id); writeProperty(id, *reinterpret_cast<QDateTime *>(a[0])); break; - case QV4::CompiledData::Property::Rect: + case QV4::CompiledData::BuiltinType::Rect: needActivate = *reinterpret_cast<QRectF *>(a[0]) != readPropertyAsRectF(id); writeProperty(id, *reinterpret_cast<QRectF *>(a[0])); break; - case QV4::CompiledData::Property::Size: + case QV4::CompiledData::BuiltinType::Size: needActivate = *reinterpret_cast<QSizeF *>(a[0]) != readPropertyAsSizeF(id); writeProperty(id, *reinterpret_cast<QSizeF *>(a[0])); break; - case QV4::CompiledData::Property::Point: + case QV4::CompiledData::BuiltinType::Point: needActivate = *reinterpret_cast<QPointF *>(a[0]) != readPropertyAsPointF(id); writeProperty(id, *reinterpret_cast<QPointF *>(a[0])); break; - case QV4::CompiledData::Property::Variant: + case QV4::CompiledData::BuiltinType::Variant: writeProperty(id, *reinterpret_cast<QVariant *>(a[0])); break; - case QV4::CompiledData::Property::Font: - case QV4::CompiledData::Property::Time: - case QV4::CompiledData::Property::Color: - case QV4::CompiledData::Property::Vector2D: - case QV4::CompiledData::Property::Vector3D: - case QV4::CompiledData::Property::Vector4D: - case QV4::CompiledData::Property::Matrix4x4: - case QV4::CompiledData::Property::Quaternion: + case QV4::CompiledData::BuiltinType::Font: + case QV4::CompiledData::BuiltinType::Time: + case QV4::CompiledData::BuiltinType::Color: + case QV4::CompiledData::BuiltinType::Vector2D: + case QV4::CompiledData::BuiltinType::Vector3D: + case QV4::CompiledData::BuiltinType::Vector4D: + case QV4::CompiledData::BuiltinType::Matrix4x4: + case QV4::CompiledData::BuiltinType::Quaternion: Q_ASSERT(fallbackMetaType != QMetaType::UnknownType); if (QV4::MemberData *md = propertyAndMethodStorageAsMemberData()) { const QV4::VariantObject *v = (md->data() + id)->as<QV4::VariantObject>(); @@ -786,11 +786,11 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * QQml_valueTypeProvider()->writeValueType(fallbackMetaType, a[0], v->d()->data()); } break; - case QV4::CompiledData::Property::Var: + case QV4::CompiledData::BuiltinType::Var: if (ep) writeProperty(id, *reinterpret_cast<QVariant *>(a[0])); break; - case QV4::CompiledData::Property::InvalidBuiltin: + case QV4::CompiledData::BuiltinType::InvalidBuiltin: if (property.isList) { // Writing such a property is not supported. Content is added through the list property // methods. @@ -966,7 +966,7 @@ QV4::ReturnedValue QQmlVMEMetaObject::method(int index) const QV4::ReturnedValue QQmlVMEMetaObject::readVarProperty(int id) const { - Q_ASSERT(compiledObject && compiledObject->propertyTable()[id].builtinType() == QV4::CompiledData::Property::Var); + Q_ASSERT(compiledObject && compiledObject->propertyTable()[id].builtinType() == QV4::CompiledData::BuiltinType::Var); QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); if (md) @@ -991,7 +991,7 @@ QVariant QQmlVMEMetaObject::readPropertyAsVariant(int id) const void QQmlVMEMetaObject::writeVarProperty(int id, const QV4::Value &value) { - Q_ASSERT(compiledObject && compiledObject->propertyTable()[id].builtinType() == QV4::CompiledData::Property::Var); + Q_ASSERT(compiledObject && compiledObject->propertyTable()[id].builtinType() == QV4::CompiledData::BuiltinType::Var); QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); if (!md) @@ -1031,7 +1031,7 @@ void QQmlVMEMetaObject::writeVarProperty(int id, const QV4::Value &value) void QQmlVMEMetaObject::writeProperty(int id, const QVariant &value) { - if (compiledObject && compiledObject->propertyTable()[id].builtinType() == QV4::CompiledData::Property::Var) { + if (compiledObject && compiledObject->propertyTable()[id].builtinType() == QV4::CompiledData::BuiltinType::Var) { QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); if (!md) return; |