blueman
blueman copied to clipboard
ManagerDeviceMenu: Do not assume all instances have been generated
If the right click instance has never been used and the user double clicks to connect it will not have a SelectedDevice yet.
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Wouldn't it be better to skip the instances that have not been generated with next instead of returning from the loop?
Not next but continue may be wise here as the order may change at some point. I'll fix that.
Thank you @infirit <3
@infirit: We fail to lock the "Device" menu with this.
If I double-click a device to connect, the right-click menu gets locked, i.e. it shows only a single, disabled "Connecting..." item. The same is expected for the "Device" menu in the menu bar but it's not the case. If I select a different device and then switch back, the menu is locked as expected as it got re-generated in the meantime.
ok, generating all instances it is then. I'll open a new PR for this.