Commit 4453554c authored by Tobias Hunger's avatar Tobias Hunger

GCC: detect compiler setting in C locale

Run detection of GCC compiler settings using the C locale. This
should fix detection of some settings in non english locales.

Task-number: QTCREATORBUG-5637
Change-Id: I3ea74ce5374fb03ea0cd43566ee302c635e02cd4
Reviewed-on: http://codereview.qt.nokia.com/2387Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
parent b407a51c
......@@ -70,7 +70,12 @@ static QByteArray runGcc(const QString &gcc, const QStringList &arguments, const
return QByteArray();
QProcess cpp;
cpp.setEnvironment(env);
// Force locale: This function is used only to detect settings inside the tool chain, so this is save.
QStringList environment(env);
environment.append(QLatin1String("LC_ALL"));
environment.append(QLatin1String("C"));
cpp.setEnvironment(environment);
cpp.start(gcc, arguments);
if (!cpp.waitForStarted()) {
qWarning("%s: Cannot start '%s': %s", Q_FUNC_INFO, qPrintable(gcc),
......
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