aboutsummaryrefslogtreecommitdiff
path: root/libLumina
diff options
context:
space:
mode:
authorChristopher Roy Bratusek <nano@jpberlin.de>2015-05-22 22:00:01 +0200
committerChristopher Roy Bratusek <nano@jpberlin.de>2015-05-22 22:00:01 +0200
commit4b50f3fb5616e3858165e14d2d9d0b12dd8739ce (patch)
tree832c06ec0691d58fdd25ee6c8b6b170bc6aa46fe /libLumina
parentFix a missing icon in the new system monitor plugin. (diff)
downloadlumina-4b50f3fb5616e3858165e14d2d9d0b12dd8739ce.tar.gz
lumina-4b50f3fb5616e3858165e14d2d9d0b12dd8739ce.tar.bz2
lumina-4b50f3fb5616e3858165e14d2d9d0b12dd8739ce.zip
LUtils::getCmdOutput enforce LANG=C
different formats of output in different locales (eg. colon vs. point as decimal delimiters)
Diffstat (limited to 'libLumina')
-rw-r--r--libLumina/LuminaUtils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index c9b13b8a..aa2336e3 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -43,6 +43,10 @@ int LUtils::runCmd(QString cmd, QStringList args){
QStringList LUtils::getCmdOutput(QString cmd, QStringList args){
QProcess proc;
+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+ env.insert("LANG", "C");
+ env.insert("LC_MESSAGES", "C");
+ proc.setProcessEnvironment(env);
proc.setProcessChannelMode(QProcess::MergedChannels);
if(args.isEmpty()){
proc.start(cmd);
bgstack15