forked from qt-creator/qt-creator
QmlDesigner: Show error/warning for root reference
Show an error when an alias property references the root item directly. Show a warning when an alias property references the root item in a hierarchy. Task-number: QDS-4380 Change-Id: I312fc0296e3bb2321a4d9e1113bd0cd4c1c0b8ed Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
ba08864954
commit
73ae5bb1f6
@@ -255,6 +255,10 @@ StaticAnalysisMessages::StaticAnalysisMessages()
|
||||
tr("Components are only allowed to have a single child element."));
|
||||
newMsg(WarnComponentRequiresChildren, Warning,
|
||||
tr("Components require a child element."));
|
||||
newMsg(ErrAliasReferRoot, Error,
|
||||
tr("Do not reference the root item as alias."));
|
||||
newMsg(WarnAliasReferRootHierarchy, Warning,
|
||||
tr("Avoid referencing the root item in a hierarchy."));
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
Reference in New Issue
Block a user