diff options
author | jan Iversen <jani@apache.org> | 2018-08-08 16:34:17 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-13 11:49:32 -0700 |
commit | 72d87364c018c61f2127b7293fff11b83e97b82c (patch) | |
tree | b2d2eff7326964fddbb4a8fc82798d616ef69d0e /desktop-widgets | |
parent | 63fa532b1520bb18eff98c10ff708834939d8e59 (diff) | |
download | subsurface-72d87364c018c61f2127b7293fff11b83e97b82c.tar.gz |
core: activate qPrefLanguage
remove Language from SettingsObjectWrapper and reference qPrefLanguage
update files using SettingsObjectWrapper/Language to use qPrefLanguage
this activated qPrefLanguage and removed the similar class from
SettingsObjectWrapper.
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/preferences/preferences_language.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/desktop-widgets/preferences/preferences_language.cpp b/desktop-widgets/preferences/preferences_language.cpp index e4a63ae9e..2bcd3422d 100644 --- a/desktop-widgets/preferences/preferences_language.cpp +++ b/desktop-widgets/preferences/preferences_language.cpp @@ -82,15 +82,15 @@ void PreferencesLanguage::syncSettings() currentLocale = m->data(languages.first(),Qt::UserRole).toString(); - auto lang = SettingsObjectWrapper::instance()->language_settings; - lang->setLanguage(currentText); - lang->setLangLocale(currentLocale); - lang->setUseSystemLanguage(ui->languageSystemDefault->isChecked()); - lang->setTimeFormatOverride(!ui->timeFormatSystemDefault->isChecked()); - lang->setDateFormatOverride(!ui->dateFormatSystemDefault->isChecked()); - lang->setTimeFormat(ui->timeFormatEntry->currentText()); - lang->setDateFormat(ui->dateFormatEntry->currentText()); - lang->setDateFormatShort(ui->shortDateFormatEntry->text()); + auto lang = qPrefLanguage::instance(); + lang->set_language(currentText); + lang->set_lang_locale(currentLocale); + lang->set_use_system_language(ui->languageSystemDefault->isChecked()); + lang->set_time_format_override(!ui->timeFormatSystemDefault->isChecked()); + lang->set_date_format_override(!ui->dateFormatSystemDefault->isChecked()); + lang->set_time_format(ui->timeFormatEntry->currentText()); + lang->set_date_format(ui->dateFormatEntry->currentText()); + lang->set_date_format_short(ui->shortDateFormatEntry->text()); uiLanguage(NULL); 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"); |