From 945a96bb51f9c3f5944016706c472be6033a191b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 5 Jun 2017 09:31:53 -0400 Subject: [PATCH] Locale: refactor to update labels in one place only --- src/modules/locale/LocalePage.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index 4b4638215..e1f1d18fc 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -171,9 +171,7 @@ LocalePage::LocalePage( QWidget* parent ) !dlg->selectedLCLocale().isEmpty() ) { m_selectedLocaleConfiguration.lang = dlg->selectedLCLocale(); - m_localeLabel->setText( tr( "The system language will be set to %1." ) - .arg( prettyLCLocale( - m_selectedLocaleConfiguration.lang ) ) ); + this->updateLocaleLabels(); } dlg->deleteLater(); @@ -203,9 +201,7 @@ LocalePage::LocalePage( QWidget* parent ) m_selectedLocaleConfiguration.lc_measurement = dlg->selectedLCLocale(); m_selectedLocaleConfiguration.lc_identification = dlg->selectedLCLocale(); - m_formatsLabel->setText( tr( "The numbers and dates locale will be set to %1." ) - .arg( prettyLCLocale( - m_selectedLocaleConfiguration.lc_numeric ) ) ); + this->updateLocaleLabels(); } dlg->deleteLater();