QSerialPortInfo class has const methods isValid() (deprecated since 5.2) and isBusy() (deprecated since 5.6). They both seem to work but QT documentation does not provide with info whether they should be replaced with isNull() or state of QSerialPortInfo object should be checked some other way.
Can anyone please tell me actual way to check serial port availability?
With reference to the documentation, both
isValid()andisBusy()are obsolete and not recommended to be used in new code.Quote from documentation (emphasis mine):
The See also section points to
isNull()method so it should be used.See commit.