diff options
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 20 |
1 files changed, 11 insertions, 9 deletions
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) { |