From b10234768b610fd5c9a06eefb1e0f297a1a7ad37 Mon Sep 17 00:00:00 2001 From: vslg Date: Tue, 8 Sep 2020 08:48:38 -0300 Subject: [PATCH] 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. --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index febcf3b5..f699fe35 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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); }