Skip to content
/ qtbase Public

Commit 1735bd2

Browse files
marcmutzQt Cherry-pick Bot
authored andcommitted
QProcess: remove no-op std::move()
You cannot move into QString::arg()¹, so don't confuse readers by attempting to try. ¹ There's also never going to be a version of arg() where you _can_ move into, because string interpolation is inherently a read-only operation that doesn't require ownership. The only conceivable situation is pinning of rvalues for the duration of the operation, as done in QStringBuilder and QStringTokenizer, but that would be an implicit move by the language, not a std::move(). Amends 030c93a. Task-number: QTBUG-144875 Change-Id: Idc4429250f23b964e89c3941561783d9e704b71c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit bbfe8f5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 43d773a)
1 parent e061a1c commit 1735bd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/corelib/io/qprocess_unix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static constexpr int FakeErrnoForThrow = std::numeric_limits<int>::max();
193193
static QString errorMessageForSyscall(QUtf8StringView fnName, int errnoCode = -1)
194194
{
195195
QString msg = qt_error_string(errnoCode);
196-
return QProcess::tr("Child process set up failed: %1: %2").arg(fnName, std::move(msg));
196+
return QProcess::tr("Child process set up failed: %1: %2").arg(fnName, msg);
197197
}
198198

199199
static QString startFailureErrorMessage(ChildError &err, [[maybe_unused]] ssize_t bytesRead)

0 commit comments

Comments
 (0)