diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index 801bbfe02a..a061394deb 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -169,9 +169,9 @@ public: template explicit QThreadCreateThread(Function &&f, Args &&... args) : m_future(std::async(std::launch::deferred, - [f = static_cast::type>(std::forward(f))](auto &&... args) mutable -> void + [f = static_cast::type>(std::forward(f))](auto &&... largs) mutable -> void { - (void)std::invoke(std::move(f), std::forward(args)...); + (void)std::invoke(std::move(f), std::forward(largs)...); }, std::forward(args)...)) { }