forked from qt-creator/qt-creator
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/2387 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user