Skip to content
Commit e3d8b03c authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Igor Kushnir
Browse files

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.
parent 7604da68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment