SocketCAN: Avoid "cannot set the bitrate" warning


Setting a SocketCAN bitrate from userspace requires the libsocketcan
library and root privileges. Therefore, users may see an error message
even though everything is working correctly.

If no bitrate is given from user side, we should not try to set the
bitrate, but rather fall back to the system settings.

So lets do two things:
* Instead of setting a default bitrate, fall back to an empty QVariant
* If no valid QVariant is given, don't try to set a bitrate

[ChangeLog][SocketCAN] The socketcan plugin no longer sets a default
bitrate of 500000. The bitrate must either be set up by system means
(ip link set ...) or by using libsocketcan and
setConfigurationParameter(QCanBusDevice::BitRateKey, ...).

Task-number: QTBUG-89066
Change-Id: I26da46b61a7270764fe77d67a9fd4486e7df1c33
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commit93444f47258761f1f0f794888794cc844d9abc2e
parenta5bb0bb8ad21a107880b37890403a4c8391e24aa
authorAndre Hartmann <aha_1980@gmx.de>
committerAndré Hartmann <aha_1980@gmx.de>
commit timeThu, 22 May 2025 06:48:00 +0000