AbstractRemoteLinuxDeployStep: Get rid of CheckResult

Use expected_str<void> instead.

Change-Id: I93518da9ba9393a3db84aefeb9edd164cd830d42
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2023-07-07 11:40:12 +02:00
parent c1c62d0d9e
commit 243341df46
6 changed files with 24 additions and 39 deletions

View File

@@ -51,11 +51,11 @@ public:
method.addOption(Tr::tr("SFTP"), Tr::tr("Use sftp if available."));
method.addOption(Tr::tr("Generic Copy"), Tr::tr("Use generic copy, most likely to succeed."));
setInternalInitializer([this] {
setInternalInitializer([this]() -> expected_str<void> {
if (BuildDeviceKitAspect::device(kit()) == DeviceKitAspect::device(kit())) {
// rsync transfer on the same device currently not implemented
// and typically not wanted.
return CheckResult::failure(
return make_unexpected(
Tr::tr("rsync is only supported for transfers between different devices."));
}
return isDeploymentPossible();