RemoteLinux: Fix const correctness

Amends c88a829059
Amends f9b4bcd3d8

Change-Id: Ia9817d4f7ba7df495e55e8729ba34258c907a545
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-11-24 20:55:54 +01:00
parent 4ad9f53989
commit 0a925009a1
2 changed files with 14 additions and 14 deletions

View File

@@ -63,7 +63,7 @@ bool RsyncDeployService::isDeploymentNecessary() const
TaskItem RsyncDeployService::mkdirTask()
{
auto setupHandler = [this](QtcProcess &process) {
const auto setupHandler = [this](QtcProcess &process) {
QStringList remoteDirs;
for (const FileToTransfer &file : std::as_const(m_files))
remoteDirs << file.m_target.parentDir().path();
@@ -75,7 +75,7 @@ TaskItem RsyncDeployService::mkdirTask()
emit stdErrData(QString::fromLocal8Bit(proc->readAllStandardError()));
});
};
auto errorHandler = [this](const QtcProcess &process) {
const auto errorHandler = [this](const QtcProcess &process) {
QString finalMessage = process.errorString();
const QString stdErr = process.cleanedStdErr();
if (!stdErr.isEmpty()) {
@@ -91,14 +91,14 @@ TaskItem RsyncDeployService::mkdirTask()
TaskItem RsyncDeployService::transferTask()
{
auto setupHandler = [this](FileTransfer &transfer) {
const auto setupHandler = [this](FileTransfer &transfer) {
transfer.setTransferMethod(FileTransferMethod::Rsync);
transfer.setRsyncFlags(m_flags);
transfer.setFilesToTransfer(m_files);
connect(&transfer, &FileTransfer::progress,
this, &AbstractRemoteLinuxDeployService::stdOutData);
};
auto errorHandler = [this](const FileTransfer &transfer) {
const auto errorHandler = [this](const FileTransfer &transfer) {
const ProcessResultData result = transfer.resultData();
if (result.m_error == QProcess::FailedToStart)
emit errorMessage(Tr::tr("rsync failed to start: %1").arg(result.m_errorString));
@@ -112,12 +112,12 @@ TaskItem RsyncDeployService::transferTask()
void RsyncDeployService::doDeploy()
{
auto finishHandler = [this] {
const auto finishHandler = [this] {
m_taskTree.release()->deleteLater();
stopDeployment();
};
Group root {
const Group root {
mkdirTask(),
transferTask(),
OnGroupDone(finishHandler),