diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 8 | ||||
| -rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 6 | ||||
| -rw-r--r-- | src/qml/qml/qqmlpropertycachecreator_p.h | 2 |
3 files changed, 5 insertions, 11 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index 1f3e0cdaca..8bdbab3b5a 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -906,9 +906,7 @@ bool IRBuilder::visit(QQmlJS::AST::UiPublicMember *node) } Property *property = New<Property>(); - property->flags = 0; - if (node->isReadonlyMember) - property->flags |= QV4::CompiledData::Property::IsReadOnly; + property->isReadOnly = node->isReadonlyMember; property->type = type; if (type >= QV4::CompiledData::Property::Custom) property->customTypeNameIndex = registerString(memberType); @@ -1037,7 +1035,7 @@ void IRBuilder::setBindingValue(QV4::CompiledData::Binding *binding, QQmlJS::AST binding->valueLocation.line = loc.startLine; binding->valueLocation.column = loc.startColumn; binding->type = QV4::CompiledData::Binding::Type_Invalid; - if (_propertyDeclaration && (_propertyDeclaration->flags & QV4::CompiledData::Property::IsReadOnly)) + if (_propertyDeclaration && _propertyDeclaration->isReadOnly) binding->flags |= QV4::CompiledData::Binding::InitializerForReadOnlyDeclaration; QQmlJS::AST::ExpressionStatement *exprStmt = QQmlJS::AST::cast<QQmlJS::AST::ExpressionStatement *>(statement); @@ -1268,7 +1266,7 @@ void IRBuilder::appendBinding(const QQmlJS::AST::SourceLocation &qualifiedNameLo binding->flags = 0; - if (_propertyDeclaration && (_propertyDeclaration->flags & QV4::CompiledData::Property::IsReadOnly)) + if (_propertyDeclaration && _propertyDeclaration->isReadOnly) binding->flags |= QV4::CompiledData::Binding::InitializerForReadOnlyDeclaration; // No type name on the initializer means it must be a group property diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index 1656fd84aa..9123f9f0ec 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -645,14 +645,10 @@ struct Property Vector2D, Vector3D, Vector4D, Matrix4x4, Quaternion, Custom, CustomList }; - enum Flags : unsigned int { - IsReadOnly = 0x1 - }; - quint32_le nameIndex; union { quint32_le_bitfield<0, 31> type; - quint32_le_bitfield<31, 1> flags; // readonly + quint32_le_bitfield<31, 1> isReadOnly; }; quint32_le customTypeNameIndex; // If type >= Custom Location location; diff --git a/src/qml/qml/qqmlpropertycachecreator_p.h b/src/qml/qml/qqmlpropertycachecreator_p.h index 935f36a4dd..1dfd01c679 100644 --- a/src/qml/qml/qqmlpropertycachecreator_p.h +++ b/src/qml/qml/qqmlpropertycachecreator_p.h @@ -547,7 +547,7 @@ inline QQmlJS::DiagnosticMessage QQmlPropertyCacheCreator<ObjectContainer>::crea propertyFlags.type = QQmlPropertyData::Flags::QListType; } - if (!(p->flags & QV4::CompiledData::Property::IsReadOnly) && p->type != QV4::CompiledData::Property::CustomList) + if (!p->isReadOnly && p->type != QV4::CompiledData::Property::CustomList) propertyFlags.isWritable = true; |
