https://bugs.kde.org/show_bug.cgi?id=529259
--- Comment #3 from Harald Sitter <[email protected]> --- The output of `udevadm info /sys/class/dmi/id` would be useful here to confirm. I am very certain the code is wrong. It'd return 0 when there are no valid sizes available. Conceivably failure to convert any size should return nullopt though as the reported total will be wrong anyway. qlonglong totalBytes = 0; for (int i = 0; i < numMemoryDevices; ++i) { const char *memoryBytesCStr = udev_device_get_property_value(dmi.get(), QStringLiteral("MEMORY_DEVICE_%1_SIZE").arg(i).toLatin1()); qlonglong memoryBytes = QByteArray(memoryBytesCStr).toLongLong(&ok); if (ok) { totalBytes += memoryBytes; } } return totalBytes; -- You are receiving this mail because: You are watching all bug changes.
