QmlDesigner: Allow multiple StateGroups in .ui.qml

Change-Id: If7f626f196899ebd49e5f6393d8e3ef81447945c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2022-09-13 12:03:22 +02:00
committed by Henning Gründl
parent 3256888294
commit fbb9dd1647

View File

@@ -973,7 +973,7 @@ void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId,
if (checkTypeForQmlUiSupport(typeId))
addMessage(ErrUnsupportedTypeInQmlUi, typeErrorLocation, typeName);
if (m_typeStack.count() > 1 && typeName == "State") {
if (m_typeStack.count() > 1 && typeName == "State" && m_typeStack.last() != "StateGroup") {
addMessage(WarnStatesOnlyInRootItemForVisualDesigner, typeErrorLocation);
addMessage(ErrStatesOnlyInRootItemInQmlUi, typeErrorLocation);
}