From ec1ebb6fb83f746b02897f047e42f5bb6aecb2b3 Mon Sep 17 00:00:00 2001 From: David Redondo Date: Tue, 28 May 2024 10:02:55 +0200 Subject: [PATCH] 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 --- src/utils/edid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/edid.cpp b/src/utils/edid.cpp index 0e926150b2..4411d82f6b 100644 --- a/src/utils/edid.cpp +++ b/src/utils/edid.cpp @@ -145,7 +145,8 @@ Edid::Edid(const void *data, uint32_t size) m_eisaId = parseEisaId(bytes); UniqueCPtr monitorName{di_info_get_model(info)}; m_monitorName = QByteArray(monitorName.get()); - m_serialNumber = QByteArray::number(productInfo->serial); + UniqueCPtr serial{di_info_get_serial(info)}; + m_serialNumber = QByteArray(serial.get()); m_vendor = parseVendor(bytes); QCryptographicHash hash(QCryptographicHash::Md5); hash.addData(m_raw);