From 8354d67d31740ab65cb34356563b00bd9e26eeab Mon Sep 17 00:00:00 2001
From: bill
Date: Tue, 4 Jun 2024 22:30:45 +0300
Subject: [PATCH] Better strings when not found
---
mainwindow.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 8b99304..47b0965 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -111,7 +111,7 @@ void MainWindow::scanDevices()
QString modelName = localObj["model_name"].toString();
QJsonArray attributes = localObj["ata_smart_attributes"].toObject()["table"].toArray();
QJsonObject nvmeLog = localObj["nvme_smart_health_information_log"].toObject();
- QString temperature = "N/A";
+ QString temperature = "-- °C";
bool healthPassed = localObj["smart_status"].toObject()["passed"].toBool();
bool caution = false;
bool bad = false;
@@ -178,7 +178,7 @@ void MainWindow::scanDevices()
health = "Bad";
healthColor = badColor;
} else {
- health = "N/A";
+ health = "Unknown";
healthColor = naColor;
}
@@ -408,7 +408,7 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal
if (temperatureInt > 0) {
temperatureValue->setText("
" + QString::number(temperatureInt) + " °C
");
} else {
- temperatureValue->setText("N/A
");
+ temperatureValue->setText("" + temperature + "
");
}
temperatureValue->setAlignment(Qt::AlignCenter);