mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-04-21 07:23:20 +03:00
Fix adata
This commit is contained in:
@@ -339,9 +339,16 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal
|
|||||||
} else if (attrObj["name"] == "Media_Wearout_Indicator") {
|
} else if (attrObj["name"] == "Media_Wearout_Indicator") {
|
||||||
int percentageUsed = attrObj["value"].toInt();
|
int percentageUsed = attrObj["value"].toInt();
|
||||||
percentage = QString::number(percentageUsed) + " %";
|
percentage = QString::number(percentageUsed) + " %";
|
||||||
} else if (attrObj["name"] == "Wear_Leveling_Count") {
|
}
|
||||||
int percentageUsed = attrObj["value"].toInt();
|
}
|
||||||
percentage = QString::number(percentageUsed) + " %";
|
if (percentage.isEmpty() && rotationRate == "---- (SSD)") { // Workaround for some drives which have this and another attribute
|
||||||
|
for (const QJsonValue &attr : attributes) {
|
||||||
|
QJsonObject attrObj = attr.toObject();
|
||||||
|
if (attrObj["name"] == "Wear_Leveling_Count") {
|
||||||
|
int percentageUsed = attrObj["value"].toInt();
|
||||||
|
percentage = QString::number(percentageUsed) + " %";
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user