sailfishos / sailfish-secrets

BSD 3-Clause "New" or "Revised" License
24 stars 15 forks source link

[sailfish-secrets] Call setFuture() in daemon after signal connection. Contributes to JB#36797 #145

Closed dcaliste closed 5 years ago

dcaliste commented 6 years ago

There is a risk of race condition when connecting the finished signal after launching the thread with setFuture(). This is documented in the Qt doc.

I agree that the risk is quite neglectible here since the thread may have some work to do and may not return instantaneously, but it's safer by calling the setFuture() after the connection.

chriadam commented 6 years ago

Yikes, thank you very much. LGTM.

chriadam commented 6 years ago

A couple of things: there's a typo in the commit tag: [sailfish-secrets]. Also, can you add: "Contributes to JB#36797"

dcaliste commented 6 years ago

Ok, corrected.