Commit e8360c87 authored by Tobias Hunger's avatar Tobias Hunger Committed by Nikita Baryshnikov

Environment: set LANGUAGE variable both with LC_MESSAGES

As LANGUAGE takes precedence on LC_MESSAGES variable sometimes

If LANG is not set to C now en locale really should be used for messages
by gcc. This fixes parsing of gcc header paths and error messages on non-
english locales

Change-Id: I96db16b555b8ff22b041b6e965558b342ef1a378
Reviewed-by: Tobias Hunger's avatarTobias Hunger <>
parent a181c3e4
......@@ -338,20 +338,27 @@ Environment Environment::systemEnvironment()
const char lcMessages[] = "LC_MESSAGES";
const char language[] = "LANGUAGE";
const char englishLocale[] = "en_US.utf8";
const char languageEnglishLocales[] = "en_US:en";
void Environment::setupEnglishOutput(Environment *environment)
QTC_ASSERT(environment, return);
environment->set(lcMessages, englishLocale);
environment->set(language, languageEnglishLocales);
void Environment::setupEnglishOutput(QProcessEnvironment *environment)
QTC_ASSERT(environment, return);
environment->insert(lcMessages, englishLocale);
environment->insert(language, languageEnglishLocales);
void Environment::setupEnglishOutput(QStringList *environment)
QTC_ASSERT(environment, return);
Environment env(*environment);
*environment = env.toStringList();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment