diff --git a/src/blackmisc/promise.h b/src/blackmisc/promise.h index 157fe91a9..b01821a51 100644 --- a/src/blackmisc/promise.h +++ b/src/blackmisc/promise.h @@ -93,7 +93,7 @@ namespace BlackMisc //! When the given future is ready, use its result to set the result of this promise. template - void chainResult(QFuture future) { doAfter(future, nullptr, [self = *this](auto &&f) mutable { self.setResult(f); }); } + void chainResult(QFuture future) { doAfter(future, nullptr, [*this](auto &&f) mutable { setResult(f); }); } //! Invoke a functor and use its return value to set the result. //! \details Useful for uniform syntax in generic code where T could be void.