QUrl: add a missing std::move()

The deslashified QString can be moved into place here.

Found by Coverity.

Amends 5e936b60fc921e21b8153a83113886a1de333b57.

Pick-to: 6.8
Coverity-Id: 477475
Change-Id: Ibdaae0a9acae56960e16d5a6fd77fc1e08036af0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 692f1a38a405b8bbef961b64d2577b4fbb2a03f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2025-03-06 13:39:31 +01:00 committed by Qt Cherry-pick Bot
parent 8e564bd00f
commit d4e0f8ee11

View File

@ -3390,7 +3390,7 @@ QUrl QUrl::fromLocalFile(const QString &localFile)
// not directly using setPath here, as we do a few more transforms
parseDecodedComponent(deslashified);
if (!qt_urlRecode(url.d->path, deslashified, {}, localPathFromUser))
url.d->path = deslashified;
url.d->path = std::move(deslashified);
return url;
}