aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/usersurvey.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-22 16:43:21 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-22 12:01:09 -0700
commiteb55ffde16f0f3c1df4c97c5229165acfda5637d (patch)
treeab19de3aaadbb1a8b14d80519eb3b894a1f384eb /desktop-widgets/usersurvey.cpp
parent2dca7d0ce5ba4045732f3fcd6c8a1170b4ad902f (diff)
downloadsubsurface-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/usersurvey.cpp')
-rw-r--r--desktop-widgets/usersurvey.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/usersurvey.cpp b/desktop-widgets/usersurvey.cpp
index 326a51f9e..9f237abea 100644
--- a/desktop-widgets/usersurvey.cpp
+++ b/desktop-widgets/usersurvey.cpp
@@ -31,7 +31,7 @@ UserSurvey::UserSurvey(QWidget *parent) : QDialog(parent),
QString osArch = SubsurfaceSysInfo::currentCpuArchitecture();
os.append(QString("&osCpuArch=%1").arg(osArch));
}
- os.append(QString("&uiLang=%1").arg(uiLanguage(NULL)));
+ os.append(QString("&uiLang=%1").arg(getUiLanguage()));
os.append(QString("&uuid=%1").arg(getUUID()));
ui->system->setPlainText(getVersion());
}
@@ -46,7 +46,7 @@ QString UserSurvey::getVersion()
sysInfo.append(tr("\nCPU architecture: %1").arg(arch));
if (arch == "i386")
sysInfo.append(tr("\nOS CPU architecture: %1").arg(SubsurfaceSysInfo::currentCpuArchitecture()));
- sysInfo.append(tr("\nLanguage: %1").arg(uiLanguage(NULL)));
+ sysInfo.append(tr("\nLanguage: %1").arg(getUiLanguage()));
return sysInfo;
}