SshRemoteProcess: Rename done() -> finished()

Change-Id: I9c22d075f50b0a2a171cbda11c7579e4735f3f4e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-02-28 15:19:42 +01:00
parent 590ae0e954
commit 0dfcc97a3e
9 changed files with 25 additions and 20 deletions

View File

@@ -56,16 +56,20 @@ SshRemoteProcess::SshRemoteProcess(const QString &command, const QStringList &co
setupSshEnvironment(this);
m_remoteCommand = command;
m_connectionArgs = connectionArgs;
}
connect(this, &QtcProcess::finished, this, [this] {
if (exitStatus() == QProcess::CrashExit)
setErrorString(tr("The ssh process crashed: %1").arg(errorString()));
emit done();
});
connect(this, &QtcProcess::errorOccurred, [this](QProcess::ProcessError error) {
if (error == QProcess::FailedToStart)
emit done();
});
void SshRemoteProcess::emitFinished()
{
if (exitStatus() == QProcess::CrashExit)
setErrorString(tr("The ssh process crashed: %1").arg(errorString()));
emit finished();
}
void SshRemoteProcess::emitErrorOccurred(QProcess::ProcessError error)
{
if (error == QProcess::FailedToStart)
emit finished();
emit errorOccurred(error);
}
void SshRemoteProcess::start()

View File

@@ -47,8 +47,9 @@ public:
static bool setupSshEnvironment(Utils::QtcProcess *process);
signals:
void done();
protected:
void emitFinished() override;
void emitErrorOccurred(QProcess::ProcessError error) override;
private:
QString m_remoteCommand;

View File

@@ -111,7 +111,7 @@ void SshRemoteProcessRunner::handleConnected()
d->m_process = d->m_connection->createRemoteProcess(d->m_command);
connect(d->m_process.get(), &SshRemoteProcess::started,
this, &SshRemoteProcessRunner::handleProcessStarted);
connect(d->m_process.get(), &SshRemoteProcess::done,
connect(d->m_process.get(), &SshRemoteProcess::finished,
this, &SshRemoteProcessRunner::handleProcessFinished);
connect(d->m_process.get(), &SshRemoteProcess::readyReadStandardOutput,
this, &SshRemoteProcessRunner::readyReadStandardOutput);