Skip to content

Commit f072485

Browse files
committedJul 3, 2018
Re-use variable for current locale
1 parent fd84f82 commit f072485

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/app/qgsoptions.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -905,11 +905,11 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
905905
//
906906
// Translation and locale settings
907907
//
908-
QString systemLocale = QLocale().name();
909-
lblSystemLocale->setText( tr( "Detected active locale on your system: %1" ).arg( systemLocale ) );
910-
QString userLocale = mSettings->value( QStringLiteral( "locale/userLocale" ), QString() ).toString();
908+
QString currentLocale = QLocale().name();
909+
lblSystemLocale->setText( tr( "Detected active locale on your system: %1" ).arg( currentLocale ) );
910+
QString userLocale = mSettings->value( QStringLiteral( "locale/userLocale" ), QString( ) ).toString();
911911
bool showGroupSeparator = mSettings->value( QStringLiteral( "locale/showGroupSeparator" ), false ).toBool();
912-
QString globalLocale = mSettings->value( QStringLiteral( "locale/globalLocale" ), QLocale().name() ).toString();
912+
QString globalLocale = mSettings->value( QStringLiteral( "locale/globalLocale" ), currentLocale ).toString();
913913
const QStringList curentI18nList( i18nList() );
914914
for ( const auto &l : curentI18nList )
915915
{

0 commit comments

Comments
 (0)
Please sign in to comment.