Linux: add an option to skip udev when enumerating serial ports


The Linux backend has three options to get the available ports:
* At first it tries to use libudev.
* If it fails, it tries to read the files in /sys/class/tty.
* If that fails as well, it tries to check the files in /dev, using
  some pre-defined filename filter.

However, some versions of libudev are known to report the information
about USB hub (VID, PID, etc) instead of providing the information
about the connected device.

[ChangeLog][QSerialPortInfo][Linux] Added the possibility to skip
the libudev lookup by setting the QT_SERIALPORT_SKIP_UDEV_LOOKUP
environment variable. In such case, the information from
/sys/class/tty is used to enumerate the available ports.

As the patch does not change the default behavior, pick it to 6.8
as well.

Fixes: QTBUG-115292
Pick-to: 6.8
Change-Id: I63b440275126073cca29df68dfe3510079d0f706
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
commitadb03af5e9ccefc7f7562ed16bee2823263a7002
parent3e710c199f20b409db8c55e7d19838484a4a8882
authorIvan Solovev <ivan.solovev@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeMon, 11 Nov 2024 14:49:41 +0000