Pass lambdas instead of member functions to QtConcurrent::run()
The order of arguments to QtConcurrent::run() changed in Qt 6 from (object, member_function_pointer) to (member_function_pointer, object). This argument-order change does not affect lambdas. So switching to lambdas makes the code compile against both Qt 5 and Qt 6. Another advantage of lambdas over member functions is that the class name is not needlessly repeated. In none of the 3 places touched by this commit the arguments after the first two need to be copied at the point where QtConcurrent::run() is called, because they are never modified after constructor. In MesonIntrospectJob::start() not copying the 3rd argument Meson::BuildDir m_buildDir is an optimization achieved by switching to a lambda.
Loading
Please register or sign in to comment