diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2011-11-15 12:57:14 +0000 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2011-11-22 15:00:35 +0100 |
commit | 9f19b848e470663a4112a5ed47952d69d45b19c5 (patch) | |
tree | 75e21a9c7a3e899993d333db2ac75749fde0d1e9 | |
parent | f6e166e504961ada05441c47f14f08fef6a73117 (diff) | |
download | qt-creator-9f19b848e470663a4112a5ed47952d69d45b19c5.tar.gz |
Override LC_ALL for the make step
Override LC_ALL in the makestep, not LANG in the toolchain's
addToEnvironment.
Task-number: QTCREATORBUG-6488
Change-Id: Ic3de4f53f99b6b9d88a1337c65aa7f4839d4099d
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
-rw-r--r-- | src/plugins/projectexplorer/gcctoolchain.cpp | 1 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/makestep.cpp | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 13dc89fff0..24aeb95908 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -382,7 +382,6 @@ void GccToolChain::addToEnvironment(Utils::Environment &env) const { if (!m_compilerPath.isEmpty()) env.prependOrSetPath(QFileInfo(m_compilerPath).absolutePath()); - env.set(QLatin1String("LANG"), QLatin1String("C")); } void GccToolChain::setDebuggerCommand(const QString &d) diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp index 0feadd5924..5dc01d82fc 100644 --- a/src/plugins/qt4projectmanager/makestep.cpp +++ b/src/plugins/qt4projectmanager/makestep.cpp @@ -143,6 +143,11 @@ bool MakeStep::init() pp->setMacroExpander(bc->macroExpander()); Utils::Environment environment = bc->environment(); + + // Force output to english for the parsers. Do this here and not in the toolchain's + // addToEnvironment() to not screw up the users run environment. + environment.set(QLatin1String("LC_ALL"), QLatin1String("C")); + pp->setEnvironment(environment); QString workingDirectory; @@ -342,7 +347,13 @@ void MakeStepConfigWidget::updateDetails() ProjectExplorer::ProcessParameters param; param.setMacroExpander(bc->macroExpander()); param.setWorkingDirectory(bc->buildDirectory()); - param.setEnvironment(bc->environment()); + Utils::Environment environment = bc->environment(); + + // Force output to english for the parsers. Do this here and not in the toolchain's + // addToEnvironment() to not screw up the users run environment. + environment.set(QLatin1String("LC_ALL"), QLatin1String("C")); + param.setEnvironment(environment); + QString makeCmd = bc->makeCommand(); if (!m_makeStep->m_makeCmd.isEmpty()) makeCmd = m_makeStep->m_makeCmd; |