diff options
Diffstat (limited to 'tdecore')
-rw-r--r-- | tdecore/tdehardwaredevices.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp index 2e6ebf68d..8dc208f0c 100644 --- a/tdecore/tdehardwaredevices.cpp +++ b/tdecore/tdehardwaredevices.cpp @@ -2118,6 +2118,7 @@ void TDEHardwareDevices::processModifiedCPUs() { TQStringList::Iterator cpuit; TQString modelName; TQString vendorName; + TQString serialNumber; for (cpuit = m_cpuInfo.begin(); cpuit != m_cpuInfo.end(); ++cpuit) { curline = *cpuit; if (curline.startsWith("Processor")) { @@ -2130,6 +2131,11 @@ void TDEHardwareDevices::processModifiedCPUs() { curline = curline.stripWhiteSpace(); vendorName = curline; } + if (curline.startsWith("Serial")) { + curline.remove(0, curline.find(":")+1); + curline = curline.stripWhiteSpace(); + serialNumber = curline; + } } for (TQStringList::Iterator cpuit = m_cpuInfo.begin(); cpuit != m_cpuInfo.end(); ++cpuit) { curline = *cpuit; @@ -2147,6 +2153,8 @@ void TDEHardwareDevices::processModifiedCPUs() { cdevice->internalSetVendorName(vendorName); if (cdevice->vendorEncoded() != vendorName) modified = true; cdevice->internalSetVendorEncoded(vendorName); + if (cdevice->serialNumber() != serialNumber) modified = true; + cdevice->internalSetSerialNumber(serialNumber); } } } |