Axivion: Simplify onDone handler

The fix went with 6116605c4c.

Change-Id: I0e9cfe6ee3d55517af71379474a66b8106ca0cb3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2024-01-24 12:56:27 +01:00
parent acf42bf90d
commit a525949a2c

View File

@@ -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<Dto::DashboardInfoDto>(url, resultHandler),
onGroupDone(onDone) // TODO: Pass CallDoneIf::Error, write task tree autotest.
onGroupDone(onDone, CallDoneIf::Error)
};
return root;
}