QmlJS: Remove overzealous 'undefined' check for enums.

The "value might be 'undefined'" warning triggered whenever the static
expression evaluator failed to produce a value. At the moment, it does
so for almost all non-trivial expressions.

The warning is now disabled.

Task-number: QTCREATORBUG-3208
This commit is contained in:
Christian Kamm
2010-11-29 08:59:54 +01:00
parent c173959f89
commit 055aa15fcc

View File

@@ -109,10 +109,8 @@ public:
if (!enumValue->keys().contains(valueName)) {
_message.message = Check::tr("unknown value for enum");
}
} else if (_rhsValue->asUndefinedValue()) {
_message.kind = DiagnosticMessage::Warning;
_message.message = Check::tr("value might be 'undefined'");
} else if (! _rhsValue->asStringValue() && ! _rhsValue->asNumberValue()) {
} else if (! _rhsValue->asStringValue() && ! _rhsValue->asNumberValue()
&& ! _rhsValue->asUndefinedValue()) {
_message.message = Check::tr("enum value is not a string or number");
}
} else {