aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-04-19 14:44:33 +0200
committerMaximilian Goldstein <max.goldstein@qt.io>2021-04-19 16:45:40 +0200
commite49be8d2b1b7acb310873a63f46980d1f0296f95 (patch)
tree49427dcac8ffd55f3b4b93c1c0f502c42c297dfd /src/qml/compiler
parent03a2e51063de99f85b3b801c7ccd6663163a61b0 (diff)
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. Pick-to: 5.15 6.0 6.1 Change-Id: Ia5ad3b54edc1b94dd94d0bf771c3494691abec71 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
index c7343e709c..dd2a5fc970 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);