Do not use qFatal on component error loop

Using qFatal will terminate the program when it
prints the first error, so use qCritical to print
all errors and then terminate the program.
This commit is contained in:
vslg 2020-09-08 08:48:38 -03:00
parent 67012d6334
commit b10234768b

View File

@ -233,7 +233,7 @@ int main(int argc, char *argv[]) {
if (component.isError()) {
for (QQmlError e : component.errors()) {
qFatal(
qCritical(
"%s:%d:%d: %s",
e.url().toString().toStdString().c_str(),
e.line(),
@ -241,6 +241,7 @@ int main(int argc, char *argv[]) {
e.description().toStdString().c_str()
);
}
qFatal("One or more errors have occurred, exiting");
app.exit(EXIT_FAILURE);
}