Translate using tr() to be Qt5-compatible

There are no utf8 in those strings, and we can translate them as
everything else with tr() instead.
QApplication::UnicodeUTF8-part is deprecated and removed in Qt5.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-03-17 22:52:42 +01:00 committed by Dirk Hohndel
parent f8d30ae528
commit 17a675367d

View file

@ -229,11 +229,11 @@ void MainTab::displayMessage(QString str)
void MainTab::updateTextLabels(bool showUnits)
{
if (showUnits && prefs.text_label_with_units) {
ui.airTempLabel->setText(QApplication::translate("MainTab", "Air temp [%1]").arg(get_temp_unit()));
ui.waterTempLabel->setText(QApplication::translate("MainTab", "Water temp [%1]").arg(get_temp_unit()));
ui.airTempLabel->setText(tr("Air temp [%1]").arg(get_temp_unit()));
ui.waterTempLabel->setText(tr("Water temp [%1]").arg(get_temp_unit()));
} else {
ui.airTempLabel->setText(QApplication::translate("MainTab", "Air temp", 0, QApplication::UnicodeUTF8));
ui.waterTempLabel->setText(QApplication::translate("MainTab", "Water temp", 0, QApplication::UnicodeUTF8));
ui.airTempLabel->setText(tr("Air temp"));
ui.waterTempLabel->setText(tr("Water temp"));
}
}