From eb55ffde16f0f3c1df4c97c5229165acfda5637d Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 22 Mar 2020 16:43:21 +0100 Subject: 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 --- map-widget/qmlmapwidgethelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'map-widget') diff --git a/map-widget/qmlmapwidgethelper.cpp b/map-widget/qmlmapwidgethelper.cpp index b2017aa49..f6a0bb64b 100644 --- a/map-widget/qmlmapwidgethelper.cpp +++ b/map-widget/qmlmapwidgethelper.cpp @@ -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;" -- cgit v1.2.3-70-g09d2