QmlJSEditor: Do not allow child items for states

Task-number: QTCREATORBUG-13003
Change-Id: I30bcee12803d2b3af804625ffdf417316e3d6c32
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Thomas Hartmann
2016-06-21 18:33:15 +02:00
parent d04f103602
commit add3828389
3 changed files with 6 additions and 0 deletions

View File

@@ -820,6 +820,9 @@ void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId,
const QString typeName = getRightMostIdentifier(typeId)->name.toString();
if (!m_typeStack.isEmpty() && m_typeStack.last() == QLatin1String("State"))
addMessage(StateCannotHaveChildItem, typeErrorLocation, typeName);
if (checkTypeForDesignerSupport(typeId))
addMessage(WarnUnsupportedTypeInVisualDesigner, typeErrorLocation, typeName);