diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-22 16:43:21 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-22 12:01:09 -0700 |
commit | eb55ffde16f0f3c1df4c97c5229165acfda5637d (patch) | |
tree | ab19de3aaadbb1a8b14d80519eb3b894a1f384eb /desktop-widgets/preferences/preferences_language.cpp | |
parent | 2dca7d0ce5ba4045732f3fcd6c8a1170b4ad902f (diff) | |
download | subsurface-eb55ffde16f0f3c1df4c97c5229165acfda5637d.tar.gz |
cleanup: split uiLanguage() in two functions
The uiLanguage() function was used for two purposes: to initialize
the language related preferences and to read the current language.
To make things more easy to follow, split this function in two:
one for initializing, one for getting the current language.
Moreover, don't return the current locale in an out-parameter
as there is already a function to do that [getLocale()].
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/preferences/preferences_language.cpp')
-rw-r--r-- | desktop-widgets/preferences/preferences_language.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/preferences/preferences_language.cpp b/desktop-widgets/preferences/preferences_language.cpp index 9de6efb8f..22b274a76 100644 --- a/desktop-widgets/preferences/preferences_language.cpp +++ b/desktop-widgets/preferences/preferences_language.cpp @@ -89,7 +89,7 @@ void PreferencesLanguage::syncSettings() qPrefLanguage::set_time_format(ui->timeFormatEntry->currentText()); qPrefLanguage::set_date_format(ui->dateFormatEntry->currentText()); qPrefLanguage::set_date_format_short(ui->shortDateFormatEntry->text()); - uiLanguage(NULL); + initUiLanguage(); QString qDateTimeWeb = tr("These will be used as is. This might not be what you intended.\nSee http://doc.qt.io/qt-5/qdatetime.html#toString"); QRegExp tfillegalchars("[^hHmszaApPt\\s:;\\.,]"); |