diff options
-rw-r--r-- | src/serialport/qserialportinfo_unix.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/serialport/qserialportinfo_unix.cpp b/src/serialport/qserialportinfo_unix.cpp index 0ed8703..9a146de 100644 --- a/src/serialport/qserialportinfo_unix.cpp +++ b/src/serialport/qserialportinfo_unix.cpp @@ -169,6 +169,10 @@ QList<QSerialPortInfo> availablePortsBySysfs() if (manufacturer.open(QIODevice::ReadOnly | QIODevice::Text)) serialPortInfo.d_ptr->manufacturer = QString::fromLatin1(manufacturer.readAll()).simplified(); + QFile serialNumber(QFileInfo(targetDir, QStringLiteral("serial")).absoluteFilePath()); + if (serialNumber.open(QIODevice::ReadOnly | QIODevice::Text)) + serialPortInfo.d_ptr->serialNumber = QString::fromLatin1(serialNumber.readAll()).simplified(); + QFile vendorIdentifier(QFileInfo(targetDir, QStringLiteral("idVendor")).absoluteFilePath()); if (vendorIdentifier.open(QIODevice::ReadOnly | QIODevice::Text)) { serialPortInfo.d_ptr->vendorIdentifier = QString::fromLatin1(vendorIdentifier.readAll()) |