Ssh: Re-base SshProcess on top of QtcProcess

Change-Id: I266820e0e2ea12d6e4a5a83a679a7279fab9cd83
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2021-06-25 14:54:27 +02:00
parent 77fed0b0fd
commit f72c4cb8ac
18 changed files with 116 additions and 105 deletions

View File

@@ -220,19 +220,19 @@ void GenericLinuxDeviceTester::handleSftpFinished(const QString &error)
void GenericLinuxDeviceTester::testRsync()
{
emit progressMessage(tr("Checking whether rsync works..."));
connect(&d->rsyncProcess, &QProcess::errorOccurred, [this] {
connect(&d->rsyncProcess, &Utils::QtcProcess::errorOccurred, [this] {
if (d->rsyncProcess.error() == QProcess::FailedToStart)
handleRsyncFinished();
});
connect(&d->rsyncProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
this, [this] {
connect(&d->rsyncProcess, &Utils::QtcProcess::finished, this, [this] {
handleRsyncFinished();
});
const RsyncCommandLine cmdLine = RsyncDeployStep::rsyncCommand(*d->connection,
RsyncDeployStep::defaultFlags());
const QStringList args = QStringList(cmdLine.options)
<< "-n" << "--exclude=*" << (cmdLine.remoteHostSpec + ":/tmp");
d->rsyncProcess.start("rsync", args);
d->rsyncProcess.setCommand(Utils::CommandLine("rsync", args));
d->rsyncProcess.start();
}
void GenericLinuxDeviceTester::handleRsyncFinished()