From d54bf8c57a85bf29c0b795e417adb16b7f900cee Mon Sep 17 00:00:00 2001 From: Maximilian Goldstein Date: Mon, 19 Apr 2021 14:44:33 +0200 Subject: qqmlirbuilder: Fix treating parser warnings as errros Previously parser warnings (i.e. inline components having lowercase names) were treated as errors. Because these were not handled properly this also resulted in the QQmlComponent with the warning never becoming ready. This resulted applications hanging instead of terminating. Change-Id: Ia5ad3b54edc1b94dd94d0bf771c3494691abec71 Reviewed-by: Fabian Kosmale (cherry picked from commit e49be8d2b1b7acb310873a63f46980d1f0296f95) Reviewed-by: Qt Cherry-pick Bot --- src/qml/compiler/qqmlirbuilder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index fa25d41113..1551c9be71 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -443,7 +443,9 @@ bool IRBuilder::generateFromQml(const QString &code, const QString &url, Documen errors << m; } - return false; + + if (!errors.isEmpty() || !parseResult) + return false; } program = parser.ast(); Q_ASSERT(program); -- cgit v1.2.3