forked from qt-creator/qt-creator
Ssh: Re-base SshProcess on top of QtcProcess
Change-Id: I266820e0e2ea12d6e4a5a83a679a7279fab9cd83 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user