From c510689fe49419339cfa6c7551e2a1f57aeb069a Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 22 Jun 2023 16:18:37 +0200 Subject: [PATCH] ClangToolRunner: Move finishAllAndDone one level up When the onSetup() handler returns StopWithError, the group stops immediately with an error, regardless of its workflow policy. Our intention is to report an error only if the initial onSetup() handler returned StopWithError. Otherwise, regardless on how the subgroup execution went, we want to report success to the parent. That's why the finishAllAndDone is an appropriate policy for the top group. In case the ProcessTask fails, we don't want to continue executing AsyncTask, that's why the finishAllAndDone got removed from the subgroup, leaving it with the default workflow policy of stopOnError. Change-Id: I86ac18f062cd431e5138f87cdb01ef59e3d77d7e Reviewed-by: David Schulz Reviewed-by: Qt CI Bot --- src/plugins/clangtools/clangtoolrunner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/clangtools/clangtoolrunner.cpp b/src/plugins/clangtools/clangtoolrunner.cpp index 666f07963b2..ecace1c7d36 100644 --- a/src/plugins/clangtools/clangtoolrunner.cpp +++ b/src/plugins/clangtools/clangtoolrunner.cpp @@ -218,11 +218,11 @@ GroupItem clangToolTask(const AnalyzeInputData &input, }; const Group group { + finishAllAndDone, Storage(storage), onGroupSetup(onSetup), Group { sequential, - finishAllAndDone, ProcessTask(onProcessSetup, onProcessDone, onProcessError), AsyncTask>(onReadSetup, onReadDone, onReadError) }