openDsh / dash

Join us on Slack! https://join.slack.com/t/opendsh/shared_invite/zt-la398uly-a6eMH5ttEQhbtE6asVKx4Q
GNU General Public License v3.0
238 stars 69 forks source link

Prevent Bluetooth from blocking dash startup #51

Closed ZeroErrors closed 3 years ago

ZeroErrors commented 3 years ago

Description:

The previous code used job->exec() which executes the init task in the current thread, this caused dash to block during start up.

I took a look at the documentation for BluezQt::Manager and noticed it shows an example using job->start() and connecting to BluezQt::InitManagerJob::result so I modified the code to do just that.

Also added some log lines so its easy to see when this happens, how long it takes and if it found any devices.

Checklist: