forked from qt-creator/qt-creator
QmlDesigner: A StateChangeScript can be the child of a State
I found this while testing our demos. Change-Id: I575e1d2f487a2ba137ac8181f4980c30b171f726 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -821,7 +821,8 @@ void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId,
|
|||||||
const QString typeName = getRightMostIdentifier(typeId)->name.toString();
|
const QString typeName = getRightMostIdentifier(typeId)->name.toString();
|
||||||
|
|
||||||
if (!m_typeStack.isEmpty() && m_typeStack.last() == QLatin1String("State")
|
if (!m_typeStack.isEmpty() && m_typeStack.last() == QLatin1String("State")
|
||||||
&& typeId->name.toString() != "PropertyChanges")
|
&& typeId->name.toString() != "PropertyChanges"
|
||||||
|
&& typeId->name.toString() != "StateChangeScript")
|
||||||
addMessage(StateCannotHaveChildItem, typeErrorLocation, typeName);
|
addMessage(StateCannotHaveChildItem, typeErrorLocation, typeName);
|
||||||
|
|
||||||
if (checkTypeForDesignerSupport(typeId))
|
if (checkTypeForDesignerSupport(typeId))
|
||||||
|
Reference in New Issue
Block a user