forked from qt-creator/qt-creator
RemoteLinux: Add guards to some RsyncDeployStep connections
Change-Id: Icfe8d21f1910eb140821fef0055390b985878651 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -102,7 +102,7 @@ void RsyncDeployService::createRemoteDirectories()
|
|||||||
remoteDirs.removeDuplicates();
|
remoteDirs.removeDuplicates();
|
||||||
m_mkdir = connection()->createRemoteProcess("mkdir -p " + QtcProcess::Arguments
|
m_mkdir = connection()->createRemoteProcess("mkdir -p " + QtcProcess::Arguments
|
||||||
::createUnixArgs(remoteDirs).toString().toUtf8());
|
::createUnixArgs(remoteDirs).toString().toUtf8());
|
||||||
connect(m_mkdir.get(), &SshRemoteProcess::done, [this](const QString &error) {
|
connect(m_mkdir.get(), &SshRemoteProcess::done, this, [this](const QString &error) {
|
||||||
QString userError;
|
QString userError;
|
||||||
if (!error.isEmpty())
|
if (!error.isEmpty())
|
||||||
userError = error;
|
userError = error;
|
||||||
@@ -120,19 +120,19 @@ void RsyncDeployService::createRemoteDirectories()
|
|||||||
|
|
||||||
void RsyncDeployService::deployFiles()
|
void RsyncDeployService::deployFiles()
|
||||||
{
|
{
|
||||||
connect(&m_rsync, &QProcess::readyReadStandardOutput, [this] {
|
connect(&m_rsync, &QProcess::readyReadStandardOutput, this, [this] {
|
||||||
emit progressMessage(QString::fromLocal8Bit(m_rsync.readAllStandardOutput()));
|
emit progressMessage(QString::fromLocal8Bit(m_rsync.readAllStandardOutput()));
|
||||||
});
|
});
|
||||||
connect(&m_rsync, &QProcess::readyReadStandardError, [this] {
|
connect(&m_rsync, &QProcess::readyReadStandardError, this, [this] {
|
||||||
emit warningMessage(QString::fromLocal8Bit(m_rsync.readAllStandardError()));
|
emit warningMessage(QString::fromLocal8Bit(m_rsync.readAllStandardError()));
|
||||||
});
|
});
|
||||||
connect(&m_rsync, &QProcess::errorOccurred, [this] {
|
connect(&m_rsync, &QProcess::errorOccurred, this, [this] {
|
||||||
if (m_rsync.error() == QProcess::FailedToStart) {
|
if (m_rsync.error() == QProcess::FailedToStart) {
|
||||||
emit errorMessage(tr("rsync failed to start: %1").arg(m_rsync.errorString()));
|
emit errorMessage(tr("rsync failed to start: %1").arg(m_rsync.errorString()));
|
||||||
setFinished();
|
setFinished();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(&m_rsync, static_cast<void (QProcess::*)(int)>(&QProcess::finished), [this] {
|
connect(&m_rsync, static_cast<void (QProcess::*)(int)>(&QProcess::finished), this, [this] {
|
||||||
if (m_rsync.exitStatus() == QProcess::CrashExit) {
|
if (m_rsync.exitStatus() == QProcess::CrashExit) {
|
||||||
emit errorMessage(tr("rsync crashed."));
|
emit errorMessage(tr("rsync crashed."));
|
||||||
setFinished();
|
setFinished();
|
||||||
|
Reference in New Issue
Block a user