diff --git a/src/blackmisc/worker.h b/src/blackmisc/worker.h index abea2166a..b0cf820b9 100644 --- a/src/blackmisc/worker.h +++ b/src/blackmisc/worker.h @@ -224,7 +224,7 @@ namespace BlackMisc static CWorker *fromTask(QObject *owner, const QString &name, F &&task) { int typeId = qMetaTypeId(task)())>>(); - return fromTaskImpl(owner, name, typeId, [task = std::forward(task)]() { return CVariant::fromResultOf(std::move(task)); }); + return fromTaskImpl(owner, name, typeId, [task = std::forward(task)]() mutable { return CVariant::fromResultOf(std::move(task)); }); } //! Connects to a functor to which will be passed the result when the task is finished.