QFutureInterfaceBase::setContinuation(): add a missing std::move()

Found by Coverity: We can move the shared_ptr into the last lambda
instead of copying it.

Amends b0e82f598193f7d2c331a7ff3da7e2d3114db714.

Coverity-Id: 474727
Change-Id: If0eb759c97c1e3d1e00aa0ff541ce257a2a2ff69
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Marc Mutz 2025-02-13 08:32:17 +01:00
parent c2fa41a081
commit 20d058acfc

View File

@ -968,7 +968,8 @@ void QFutureInterfaceBase::setContinuation(const QObject *context, std::function
// Capture continuationFuture so that it lives as long as the continuation,
// and the continuation data remains valid.
setContinuation([watcherMutex, watcher = QPointer(watcher), continuationFuture]
setContinuation([watcherMutex = std::move(watcherMutex),
watcher = QPointer(watcher), continuationFuture]
(const QFutureInterfaceBase &parentData)
{
Q_UNUSED(parentData);