From 0db6f2a372f153f3f5403dd96f310b68d7b55de1 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 1 Jul 2016 14:36:34 +0200 Subject: [PATCH] QmlDesigner: A StateChangeScript can be the child of a State I found this while testing our demos. Change-Id: I575e1d2f487a2ba137ac8181f4980c30b171f726 Reviewed-by: Alessandro Portale --- src/libs/qmljs/qmljscheck.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index 26b5b3ff19b..9610a95f72d 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -821,7 +821,8 @@ void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId, const QString typeName = getRightMostIdentifier(typeId)->name.toString(); 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); if (checkTypeForDesignerSupport(typeId))