mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-04-20 09:43:18 +03:00
Add life info for Crucial SATA SSDs
This commit is contained in:
@@ -281,7 +281,12 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal
|
|||||||
if (!isNvme) {
|
if (!isNvme) {
|
||||||
for (const QJsonValue &attr : attributes) {
|
for (const QJsonValue &attr : attributes) {
|
||||||
QJsonObject attrObj = attr.toObject();
|
QJsonObject attrObj = attr.toObject();
|
||||||
if (attrObj["id"] == 241) {
|
if (attrObj["id"] == 202) {
|
||||||
|
if (attrObj["name"] == "Percent_Lifetime_Remain") {
|
||||||
|
int percentageUsed = 100 - attrObj["raw"].toObject()["value"].toInt();
|
||||||
|
percentage = QString::number(percentageUsed) + " %";
|
||||||
|
}
|
||||||
|
} else if (attrObj["id"] == 241) {
|
||||||
if (attrObj["name"] == "Total_Writes_GB") {
|
if (attrObj["name"] == "Total_Writes_GB") {
|
||||||
totalWrites = QString::number(attrObj["raw"].toObject()["value"].toInt()) + " GB";
|
totalWrites = QString::number(attrObj["raw"].toObject()["value"].toInt()) + " GB";
|
||||||
} else if (attrObj["name"] == "Host_Writes_32MiB") {
|
} else if (attrObj["name"] == "Host_Writes_32MiB") {
|
||||||
|
|||||||
Reference in New Issue
Block a user