Changeset View
Changeset View
Standalone View
Standalone View
src/core/smartstatus.cpp
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 51 | { | |||
---|---|---|---|---|---|
77 | setInitSuccess(true); | 77 | setInitSuccess(true); | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | QString SmartStatus::tempToString(quint64 mkelvin) | 80 | QString SmartStatus::tempToString(quint64 mkelvin) | ||
81 | { | 81 | { | ||
82 | const double celsius = (mkelvin - 273150.0) / 1000.0; | 82 | const double celsius = (mkelvin - 273150.0) / 1000.0; | ||
83 | const double fahrenheit = 9.0 * celsius / 5.0 + 32; | 83 | const double fahrenheit = 9.0 * celsius / 5.0 + 32; | ||
84 | return xi18nc("@item:intable degrees in Celsius and Fahrenheit", "%1° C / %2° F", | 84 | return xi18nc("@item:intable degrees in Celsius and Fahrenheit", "%1° C / %2° F", | ||
85 | QLocale().toString(celsius, 1), QLocale().toString(fahrenheit, 1)); | 85 | QLocale().toString(celsius, 'g', 2), QLocale().toString(fahrenheit, 'g', 2)); | ||
86 | } | 86 | } | ||
87 | 87 | | |||
88 | QString SmartStatus::selfTestStatusToString(SmartStatus::SelfTestStatus s) | 88 | QString SmartStatus::selfTestStatusToString(SmartStatus::SelfTestStatus s) | ||
89 | { | 89 | { | ||
90 | switch (s) { | 90 | switch (s) { | ||
91 | case SelfTestStatus::Aborted: | 91 | case SelfTestStatus::Aborted: | ||
92 | return xi18nc("@item", "Aborted"); | 92 | return xi18nc("@item", "Aborted"); | ||
93 | 93 | | |||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |