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