From fbb9dd1647c60409dca7f64760b8036f3f38909f Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Tue, 13 Sep 2022 12:03:22 +0200 Subject: [PATCH] QmlDesigner: Allow multiple StateGroups in .ui.qml Change-Id: If7f626f196899ebd49e5f6393d8e3ef81447945c Reviewed-by: Thomas Hartmann --- src/libs/qmljs/qmljscheck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index dbb0962d0cf..641d28e0d97 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -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); }