QmlJS: Fix severity of some (non-)error

"Calls of functions that start with an uppercase letter
should use 'new'." is a warning, not an error.

Fixes: QTCREATORBUG-27522
Change-Id: If1f82665819053b72e412a51cf4cf3c9b3e91ae2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
hjk
2024-06-13 15:00:24 +02:00
parent 5665c349d1
commit 9fe4f23272

View File

@@ -153,7 +153,7 @@ StaticAnalysisMessages::StaticAnalysisMessages()
Tr::tr("Invalid property type \"%1\"."), 1); Tr::tr("Invalid property type \"%1\"."), 1);
newMsg(WarnEqualityTypeCoercion, Error, newMsg(WarnEqualityTypeCoercion, Error,
Tr::tr("== and != perform type coercion, use === or !== to avoid it.")); Tr::tr("== and != perform type coercion, use === or !== to avoid it."));
newMsg(WarnExpectedNewWithUppercaseFunction, Error, newMsg(WarnExpectedNewWithUppercaseFunction, Warning,
Tr::tr("Calls of functions that start with an uppercase letter should use 'new'.")); Tr::tr("Calls of functions that start with an uppercase letter should use 'new'."));
newMsg(WarnNewWithLowercaseFunction, Error, newMsg(WarnNewWithLowercaseFunction, Error,
Tr::tr("Use 'new' only with functions that start with an uppercase letter.")); Tr::tr("Use 'new' only with functions that start with an uppercase letter."));