LinuxDeviceTester: Get rid of unused storage

The storage is now only set, never read -> thus remove it.

Amends 3cd0dad3d4

Change-Id: Icf95c03b923b07ed1a734fe522567d1851231960
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2024-07-02 01:13:15 +02:00
parent bdcac43936
commit f207707cc9

View File

@@ -27,11 +27,6 @@ using namespace Utils;
namespace RemoteLinux {
namespace Internal {
struct TransferStorage
{
bool useGenericCopy = false;
};
class GenericLinuxDeviceTesterPrivate
{
public:
@@ -43,8 +38,7 @@ public:
GroupItem echoTask(const QString &contents) const;
GroupItem unameTask() const;
GroupItem gathererTask() const;
GroupItem transferTask(FileTransferMethod method,
const Storage<TransferStorage> &storage) const;
GroupItem transferTask(FileTransferMethod method) const;
GroupItem transferTasks() const;
GroupItem commandTasks() const;
@@ -192,8 +186,7 @@ GroupItem GenericLinuxDeviceTesterPrivate::gathererTask() const
};
}
GroupItem GenericLinuxDeviceTesterPrivate::transferTask(FileTransferMethod method,
const Storage<TransferStorage> &storage) const
GroupItem GenericLinuxDeviceTesterPrivate::transferTask(FileTransferMethod method) const
{
const auto onSetup = [this, method](FileTransfer &transfer) {
emit q->progressMessage(Tr::tr("Checking whether \"%1\" works...")
@@ -201,7 +194,7 @@ GroupItem GenericLinuxDeviceTesterPrivate::transferTask(FileTransferMethod metho
transfer.setTransferMethod(method);
transfer.setTestDevice(m_device);
};
const auto onDone = [this, method, storage](const FileTransfer &transfer, DoneWith result) {
const auto onDone = [this, method](const FileTransfer &transfer, DoneWith result) {
const QString methodName = FileTransfer::transferMethodName(method);
if (result == DoneWith::Success) {
emit q->progressMessage(Tr::tr("\"%1\" is functional.\n").arg(methodName));
@@ -209,8 +202,6 @@ GroupItem GenericLinuxDeviceTesterPrivate::transferTask(FileTransferMethod metho
m_device->setExtraData(Constants::SUPPORTS_RSYNC, true);
else if (method == FileTransferMethod::Sftp)
m_device->setExtraData(Constants::SUPPORTS_SFTP, true);
else
storage->useGenericCopy = true;
return;
}
const ProcessResultData resultData = transfer.resultData();
@@ -251,13 +242,11 @@ GroupItem GenericLinuxDeviceTesterPrivate::transferTask(FileTransferMethod metho
GroupItem GenericLinuxDeviceTesterPrivate::transferTasks() const
{
Storage<TransferStorage> storage;
return Group {
continueOnSuccess,
storage,
transferTask(FileTransferMethod::GenericCopy, storage),
transferTask(FileTransferMethod::Sftp, storage),
transferTask(FileTransferMethod::Rsync, storage),
transferTask(FileTransferMethod::GenericCopy),
transferTask(FileTransferMethod::Sftp),
transferTask(FileTransferMethod::Rsync),
onGroupDone([this] {
emit q->errorMessage(Tr::tr("Deployment to this device will not work out of the box.")
+ "\n");