Use di_info_get_serial to fetch the serial number from EDID

This will also look at the "product serial string" in addition
to the actual serial number. The former is what we use elsewhere
in Plasma like the kscreen kcm.
BUG:485015
FIXED-IN:6.1
This commit is contained in:
David Redondo 2024-05-28 10:02:55 +02:00
parent 1d05f98e4b
commit ec1ebb6fb8

View file

@ -145,7 +145,8 @@ Edid::Edid(const void *data, uint32_t size)
m_eisaId = parseEisaId(bytes);
UniqueCPtr<char> monitorName{di_info_get_model(info)};
m_monitorName = QByteArray(monitorName.get());
m_serialNumber = QByteArray::number(productInfo->serial);
UniqueCPtr<char> serial{di_info_get_serial(info)};
m_serialNumber = QByteArray(serial.get());
m_vendor = parseVendor(bytes);
QCryptographicHash hash(QCryptographicHash::Md5);
hash.addData(m_raw);