make use of real environment a separate option

only creator needs to set an own environment - the testreader, lupdate
and qmake don't.

Change-Id: I4ff561a3008d423969a3f331bdc5d16b281a020b
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-08-28 18:27:28 +02:00
parent e513ee1bb0
commit 93b8270bd9
5 changed files with 9 additions and 6 deletions

View File

@@ -319,8 +319,10 @@ QMakeEvaluator::writeFile(const QString &ctx, const QString &fn, QIODevice::Open
void QMakeEvaluator::runProcess(QProcess *proc, const QString &command) const
{
proc->setWorkingDirectory(currentDirectory());
# ifdef PROEVALUATOR_SETENV
if (!m_option->environment.isEmpty())
proc->setProcessEnvironment(m_option->environment);
# endif
# ifdef Q_OS_WIN
proc->setNativeArguments(QLatin1String("/v:off /s /c \"") + command + QLatin1Char('"'));
proc->start(m_option->getEnv(QLatin1String("COMSPEC")), QStringList());