forked from qt-creator/qt-creator
QmlDesigner: avoid warnings for StaticAnalysis
The warnings were triggered by the constructor of Message. We use PrototypeMessageData which is just the pure data. Change-Id: Iaa85880000ccd936d98517ce5d3294d3040f8cee Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -776,9 +776,9 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
|
|||||||
check.disableMessage(StaticAnalysis::ErrCouldNotResolvePrototypeOf);
|
check.disableMessage(StaticAnalysis::ErrCouldNotResolvePrototypeOf);
|
||||||
|
|
||||||
foreach (StaticAnalysis::Type type, StaticAnalysis::Message::allMessageTypes()) {
|
foreach (StaticAnalysis::Type type, StaticAnalysis::Message::allMessageTypes()) {
|
||||||
StaticAnalysis::Message message(type, AST::SourceLocation());
|
StaticAnalysis::PrototypeMessageData prototypeMessageData = StaticAnalysis::Message::prototypeForMessageType(type);
|
||||||
if (message.severity == StaticAnalysis::MaybeWarning
|
if (prototypeMessageData.severity == StaticAnalysis::MaybeWarning
|
||||||
|| message.severity == StaticAnalysis::Warning) {
|
|| prototypeMessageData.severity == StaticAnalysis::Warning) {
|
||||||
check.disableMessage(type);
|
check.disableMessage(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user