[Development] Should QFileSystemWatcher be thread-safe? (Qt 5.8.0)

René J.V. Bertin rjvbertin at gmail.com
Mon Oct 2 12:53:24 CEST 2017


On Monday October 02 2017 11:12:35 Sergio Martins wrote:

Hi,

> You were probably capturing a local variable by reference inside the 
> lambda, which then went out of scope.

That sounds likely (I used '[&]' as the other lambdas do in the same method. I don't think I considered scope when trying to understand the crash (stupid...).

> See 
> https://github.com/KDE/clazy/blob/master/src/checks/level0/README-lambda-in-connect.md 
> for how to catch it at compile time.

Thanks, I'll keep that in mind for future reference.

R.



More information about the Development mailing list