QThread: fix headersclean with C++17

GCC's -Wshadow complained about the re-use of 'args' as the parameter
for the lambda.

Fix by renaming it to largs (lambda-args) instead.

Change-Id: Ia9e65b82b98ee56181d754868354988399496eef
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Marc Mutz 2017-04-25 09:24:17 +02:00 committed by Giuseppe D'Angelo
parent 09f6227653
commit 0cfcebb955

View File

@ -169,9 +169,9 @@ public:
template <typename Function, typename... Args>
explicit QThreadCreateThread(Function &&f, Args &&... args)
: m_future(std::async(std::launch::deferred,
[f = static_cast<typename std::decay<Function>::type>(std::forward<Function>(f))](auto &&... args) mutable -> void
[f = static_cast<typename std::decay<Function>::type>(std::forward<Function>(f))](auto &&... largs) mutable -> void
{
(void)std::invoke(std::move(f), std::forward<decltype(args)>(args)...);
(void)std::invoke(std::move(f), std::forward<decltype(largs)>(largs)...);
}, std::forward<Args>(args)...))
{
}