Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.3.1
-
None
-
Windows 7 (x64), Qt Desktop
Description
If a new QSerialPortInfo object is created using the default constructor, isNull() returns false instead of true:
QSerialPortInfo info;
info.isNull(); // returns false (should be true)
The isNull()-method is important for us to check the result of a method that tries to find a serial port by vendor ID and/or product ID:
QSerialPortInfo portInfo = findPortInfo(vendorId, productId); if (portInfo.isNull()) { // port not found }