forked from qt-creator/qt-creator
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:
@@ -350,8 +350,8 @@ Group dashboardInfoRecipe(const DashboardInfoHandler &handler)
|
|||||||
}
|
}
|
||||||
return SetupResult::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto onDone = [handler](DoneWith result) {
|
const auto onDone = [handler] {
|
||||||
if (result == DoneWith::Error && handler)
|
if (handler)
|
||||||
handler(make_unexpected(QString("Error"))); // TODO: Collect error message in the storage.
|
handler(make_unexpected(QString("Error"))); // TODO: Collect error message in the storage.
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -366,7 +366,7 @@ Group dashboardInfoRecipe(const DashboardInfoHandler &handler)
|
|||||||
const Group root {
|
const Group root {
|
||||||
onGroupSetup(onSetup), // Stops if cache exists.
|
onGroupSetup(onSetup), // Stops if cache exists.
|
||||||
fetchDataRecipe<Dto::DashboardInfoDto>(url, resultHandler),
|
fetchDataRecipe<Dto::DashboardInfoDto>(url, resultHandler),
|
||||||
onGroupDone(onDone) // TODO: Pass CallDoneIf::Error, write task tree autotest.
|
onGroupDone(onDone, CallDoneIf::Error)
|
||||||
};
|
};
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user