## Summary
Fix Bluetooth branch build errors for changes in !678
## Test Plan
### Before:
Build errors in bluetoothlinkprovider.cpp due to undefined variable and due to incorrect argument type.
```
/home/simon/src/kdeconnect-kde/core/backends/bluetooth/bluetoothlinkprovider.cpp:301:56: error: cann
ot convert ‘NetworkPacket’ to ‘NetworkPacket*’
301 | if (!success || !DeviceInfo::isValidIdentityPacket(receivedPacket)) {
| ^~~~~~~~~~~~~~
| |
| NetworkPacket
<snip>
```
### After:
Clean build.
The plugin should always be loaded, as:
- we can provide a virtual display over VNC, even if the device isn't capable to use virtual displays itself (`krfb-virtualmonitor`)
- we would do the capabilities check regardless, if !670 gets merged
- hiding the DBus path doesn't trigger the `PluginChecker.qml` to think the plugin is unavailable, it just doesn't work
- -> is this a bug or intended behaviour?
BUG: 485829
## Summary
Currently, the plugin just fails silently if the local device is missing the `krfb` package or if the remote device misses an `vnc://` protocol/scheme handler. You click the button and nothing happens.
One issue is, that the plugin is considered `virtualmonitor.available` in the `DeviceDelegate.qml`, even if the check for `krfb-virtualmonitor` fails and no dbus-path is provided. I investigated the behavior a bit, but ignored it in the end as this MR benefits from being shown for device constellations that _could_ provide this feature.
A warning is shown with brief instructions, how to get the plugin working correctly.
- Check if krfb-virtualmonitor is available locally
- Check default scheme handler for vnc:// on device (Linux)
- Show warnings / reasons, if no connection could be established
## Test Plan
Regarding if the devices have mentioned packages installed, we should see different behaviors.
If the remote device has no VNC client, it can not connect to out server. _A warning should be shown._
If the local device hasn't the `krfb-virtualmonitor` available, the remote device couldn't connect. _A warning should be shown._
If both problems are present, _both warnings should be shown._
If none of these are present, no warning should be shown and we should try to establish a connection.
The connection attempts failed? _A warning should be shown._
When using 'Send a file/URL' in the indicator with multiple devices, the
device the user selects for file sharing is not automatically selected in
the URL handler dialog that follows.
This happens because `model.rowForDevice(deviceId)` is called without
waiting for the model to be populated, always returning -1.
Resolving this exposed another bug, where the selected device was still
not the one picked. This happens because `proxyModel` is used to fill the
`QComboBox` but `model` is used to find the correct index. Since
`DevicesPluginFilterProxyModel` sorts and filters the data from `model`
the indices do not match.
This commit addresses these issues by deferring the device selection until
data is available and implementing `rowForDevice` for filtered/sorted data
in `DevicesPluginFilterProxyModel`.
Use smaller and safer EC keys, replacing 2048 bit RSA.
NID_X9_62_prime256v1 is roughly as secure as a 3072 bit RSA key, but way shorter.
Since we have to embed the key in the identity packet that is sent over UDP and
some stacks aren't happy with large UDP messages (notably: macos), I switched to
EC instead of to a longer RSA key.
This seems to be compatible with other clients even on older systems like Android 5.0.
I did stick with NID_X9_62_prime256v1 because stronger EC like NID_secp384r1 failed
the handshake (I didn't investigate why).
We now store the kind of key in the config, so we can know which kind of key we are loading.