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>
This commit is contained in:
Berthold Stoeger 2020-03-22 16:43:21 +01:00 committed by Dirk Hohndel
parent 2dca7d0ce5
commit eb55ffde16
8 changed files with 19 additions and 20 deletions

View file

@ -254,7 +254,7 @@ bool MapWidgetHelper::editMode() const
QString MapWidgetHelper::pluginObject()
{
QString lang = uiLanguage(NULL).replace('_', '-');
QString lang = getUiLanguage().replace('_', '-');
QString cacheFolder = QString(system_default_directory()).append("/googlemaps").replace("\\", "/");
return QStringLiteral("import QtQuick 2.0;"
"import QtLocation 5.3;"