mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-18 18:50:54 +03:00
Fix an SK Hynix drive
This commit is contained in:
@@ -573,11 +573,14 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal
|
|||||||
int percentageUsed = attrObj["raw"].toObject()["value"].toInt();
|
int percentageUsed = attrObj["raw"].toObject()["value"].toInt();
|
||||||
percentage = QString::number(percentageUsed) + " %";
|
percentage = QString::number(percentageUsed) + " %";
|
||||||
} else if (attrObj["name"] == "Percent_Lifetime_Remain") {
|
} else if (attrObj["name"] == "Percent_Lifetime_Remain") {
|
||||||
int percentageUsed = attrObj["raw"].toObject()["value"].toInt();
|
int percentageUsed = attrObj["value"].toInt();
|
||||||
percentage = QString::number(percentageUsed) + " %";
|
percentage = QString::number(percentageUsed) + " %";
|
||||||
} else if (attrObj["name"] == "Media_Wearout_Indicator" || attrObj["name"] == "SSD_Life_Left") {
|
} else if (attrObj["name"] == "Media_Wearout_Indicator" || attrObj["name"] == "SSD_Life_Left") {
|
||||||
int percentageUsed = attrObj["value"].toInt();
|
int percentageUsed = attrObj["value"].toInt();
|
||||||
percentage = QString::number(percentageUsed) + " %";
|
int percentageUsedWorst = attrObj["worst"].toInt();
|
||||||
|
if (percentageUsedWorst <= 100) {
|
||||||
|
percentage = QString::number(percentageUsed) + " %";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (percentage.isEmpty() && rotationRate == "---- (SSD)") { // Workaround for some drives which have this and another attribute
|
if (percentage.isEmpty() && rotationRate == "---- (SSD)") { // Workaround for some drives which have this and another attribute
|
||||||
|
|||||||
Reference in New Issue
Block a user