From a525949a2c79ca94482498482faed9e7b8db5213 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 24 Jan 2024 12:56:27 +0100 Subject: [PATCH] Axivion: Simplify onDone handler The fix went with 6116605c4cd11de9347c4bd57b230d3e938d17bb. Change-Id: I0e9cfe6ee3d55517af71379474a66b8106ca0cb3 Reviewed-by: Christian Stenger Reviewed-by: --- src/plugins/axivion/axivionplugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/axivion/axivionplugin.cpp b/src/plugins/axivion/axivionplugin.cpp index 6225b57d114..b05038609ae 100644 --- a/src/plugins/axivion/axivionplugin.cpp +++ b/src/plugins/axivion/axivionplugin.cpp @@ -350,8 +350,8 @@ Group dashboardInfoRecipe(const DashboardInfoHandler &handler) } return SetupResult::Continue; }; - const auto onDone = [handler](DoneWith result) { - if (result == DoneWith::Error && handler) + const auto onDone = [handler] { + if (handler) handler(make_unexpected(QString("Error"))); // TODO: Collect error message in the storage. }; @@ -366,7 +366,7 @@ Group dashboardInfoRecipe(const DashboardInfoHandler &handler) const Group root { onGroupSetup(onSetup), // Stops if cache exists. fetchDataRecipe(url, resultHandler), - onGroupDone(onDone) // TODO: Pass CallDoneIf::Error, write task tree autotest. + onGroupDone(onDone, CallDoneIf::Error) }; return root; }