Qt-LambdaInConnect

Lambdas that capture local variables by reference should not be used inside connect calls

Required inputs: IR

Local variables that are captured by reference by a lambda inside a connect might be out of scope when the lambda gets called. Only exception is when the captured local variable reference is also used as the third parameter for connect.

This rule is based on clazy rule lambda-in-connect

Possible Messages

Key

Text

Severity

Disabled

lambda_in_connect

Lambda inside connect captures {} by reference.

None

False

Options

level

level : int = 0

Importance level of the rule as given for clazy. 0 is most desirable, higher values fall off in quality.