QmlJS: Add error message for Component with multiple children

Component is only allowed to have a single child element, that will
be the root element of the component.

If there is no child at all we create a warning. Having no child is
temporarily required.

Change-Id: I5c0d9d9cdf1be106b20ed4f1134a973d58126498
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2021-09-28 15:23:42 +02:00
parent ebc753cf9b
commit 39738dee77
4 changed files with 31 additions and 3 deletions

View File

@@ -158,6 +158,7 @@ private:
bool _importsOk;
bool _inStatementBinding;
int _componentChildCount = 0;
const Imports *_imports;
TranslationFunction lastTransLationfunction = noTranslationfunction;
};