mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
f8d30ae528
commit
17a675367d
1 changed files with 4 additions and 4 deletions
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue