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:
parent
67012d6334
commit
b10234768b
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user