QQmlSA: Turn BindingType into a enum class
This avoids future conflicts between different "Invalid" values. Pick-to: 6.6 Change-Id: I42f3d6e5b6d1b46931999dc2c72177872a104be9 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
parent
4f5e36ac59
commit
bc62914fe3
|
@ -245,7 +245,7 @@ Element QQmlSA::Binding::literalType(const QQmlJSTypeResolver *resolver) const
|
|||
bool Binding::hasUndefinedScriptValue() const
|
||||
{
|
||||
const auto &jsBinding = BindingPrivate::binding(*this);
|
||||
return jsBinding.bindingType() == Script
|
||||
return jsBinding.bindingType() == BindingType::Script
|
||||
&& jsBinding.scriptValueType() == ScriptValue_Undefined;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class QQmlJSScope;
|
|||
|
||||
namespace QQmlSA {
|
||||
|
||||
enum BindingType : unsigned int {
|
||||
enum class BindingType : unsigned int {
|
||||
Invalid,
|
||||
BoolLiteral,
|
||||
NumberLiteral,
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
? u"NULL"_s
|
||||
: (value.name().isNull() ? value.baseTypeName()
|
||||
: value.name()))
|
||||
.arg(binding.bindingType())
|
||||
.arg(qToUnderlying(binding.bindingType()))
|
||||
.arg(bindingScope.baseTypeName()),
|
||||
plugin, bindingScope.sourceLocation());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue