Utils: Use multi-arg for strings

Change-Id: I57d87b8f0435c7b304c484ad4d728b59780f212d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2023-01-10 23:54:26 +01:00
parent ed3d75b044
commit 398b5656b4
5 changed files with 14 additions and 21 deletions

View File

@@ -109,10 +109,8 @@ RunResult DeviceShell::run(const CommandLine &cmd, const QByteArray &stdInData)
const auto it = m_commandOutput.insert(id, CommandRun{{-1, {}, {}}, &waiter});
QMetaObject::invokeMethod(m_shellProcess.get(), [this, id, cmd, stdInData] {
const QString command = QString("%1 \"%2\" %3\n")
.arg(id)
.arg(QString::fromLatin1(stdInData.toBase64()))
.arg(cmd.toUserOutput());
const QString command = QString("%1 \"%2\" %3\n").arg(id)
.arg(QString::fromLatin1(stdInData.toBase64()), cmd.toUserOutput());
qCDebug(deviceShellLog) << "Running via shell:" << command;
m_shellProcess->writeRaw(command.toUtf8());
});