forked from qt-creator/qt-creator
Add interface to check incompatible qml ids
Task-number: QDS-10121 Change-Id: I112bee4e9323dc4eff30ec7a4693c1e9632d6ba9 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -680,6 +680,11 @@ QList<StaticAnalysis::Type> Check::defaultDisabledMessagesForNonQuickUi()
|
||||
return disabled;
|
||||
}
|
||||
|
||||
bool Check::incompatibleDesignerQmlId(const QString &id)
|
||||
{
|
||||
return idsThatShouldNotBeUsedInDesigner->contains(id);
|
||||
}
|
||||
|
||||
Check::Check(Document::Ptr doc, const ContextPtr &context, Utils::QtcSettings *qtcSettings)
|
||||
: _doc(doc)
|
||||
, _context(context)
|
||||
@@ -1099,7 +1104,7 @@ bool Check::visit(UiScriptBinding *ast)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (idsThatShouldNotBeUsedInDesigner->contains(id)) {
|
||||
if (incompatibleDesignerQmlId(id)) {
|
||||
addMessage(ErrInvalidIdeInVisualDesigner, loc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user