forked from qt-creator/qt-creator
QmlJS: Add error message for Component with multiple children
Component is only allowed to have a single child element, that will be the root element of the component. If there is no child at all we create a warning. Having no child is temporarily required. Change-Id: I5c0d9d9cdf1be106b20ed4f1134a973d58126498 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -251,6 +251,10 @@ StaticAnalysisMessages::StaticAnalysisMessages()
|
||||
tr("Type cannot be instantiated recursively (%1)."), 1);
|
||||
newMsg(WarnLogicalValueDoesNotDependOnValues, Warning,
|
||||
tr("Logical value does not depend on actual values"));
|
||||
newMsg(ErrToManyComponentChildren, Error,
|
||||
tr("Components are only allowed to have a single child element."));
|
||||
newMsg(WarnComponentRequiresChildren, Warning,
|
||||
tr("Components require a child element."));
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
Reference in New Issue
Block a user