GenericLinuxDeviceTester: Connect to QtcProcess::done() signal

Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I507b05cfc979db56ac7101432dd20acb68848d48
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-04-06 14:23:56 +02:00
parent 7f6b5a3bd4
commit 8816759a85

View File

@@ -222,13 +222,8 @@ void GenericLinuxDeviceTester::handleSftpFinished(const QString &error)
void GenericLinuxDeviceTester::testRsync()
{
emit progressMessage(tr("Checking whether rsync works..."));
connect(&d->rsyncProcess, &QtcProcess::errorOccurred, [this] {
if (d->rsyncProcess.error() == QProcess::FailedToStart)
handleRsyncFinished();
});
connect(&d->rsyncProcess, &QtcProcess::finished, this, [this] {
handleRsyncFinished();
});
connect(&d->rsyncProcess, &QtcProcess::done, this,
&GenericLinuxDeviceTester::handleRsyncFinished);
const RsyncCommandLine cmdLine = RsyncDeployStep::rsyncCommand(*d->connection,
RsyncDeployStep::defaultFlags());
const QStringList args = QStringList(cmdLine.options)