summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/qtsupport/qtsupport.pri1
-rw-r--r--src/plugins/qtsupport/qtsupport.pro2
-rw-r--r--src/shared/proparser/qmakebuiltins.cpp2
-rw-r--r--src/shared/proparser/qmakeglobals.cpp8
-rw-r--r--src/shared/proparser/qmakeglobals.h2
5 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/qtsupport/qtsupport.pri b/src/plugins/qtsupport/qtsupport.pri
index a419733faf..e4de26c4ca 100644
--- a/src/plugins/qtsupport/qtsupport.pri
+++ b/src/plugins/qtsupport/qtsupport.pri
@@ -5,3 +5,4 @@ DEFINES *= QMAKE_AS_LIBRARY
DEFINES *= PROPARSER_THREAD_SAFE
DEFINES *= PROEVALUATOR_THREAD_SAFE
DEFINES *= PROEVALUATOR_CUMULATIVE
+DEFINES *= PROEVALUATOR_SETENV
diff --git a/src/plugins/qtsupport/qtsupport.pro b/src/plugins/qtsupport/qtsupport.pro
index 89c691211b..e399bbedb8 100644
--- a/src/plugins/qtsupport/qtsupport.pro
+++ b/src/plugins/qtsupport/qtsupport.pro
@@ -12,7 +12,7 @@ include(../../qtcreatorplugin.pri)
include(qtsupport_dependencies.pri)
DEFINES += \
QMAKE_AS_LIBRARY QMAKE_LIBRARY \
- PROPARSER_THREAD_SAFE PROEVALUATOR_THREAD_SAFE PROEVALUATOR_CUMULATIVE
+ PROPARSER_THREAD_SAFE PROEVALUATOR_THREAD_SAFE PROEVALUATOR_CUMULATIVE PROEVALUATOR_SETENV
include(../../shared/proparser/proparser.pri)
HEADERS += \
diff --git a/src/shared/proparser/qmakebuiltins.cpp b/src/shared/proparser/qmakebuiltins.cpp
index 869aafc96a..051dcf0fa0 100644
--- a/src/shared/proparser/qmakebuiltins.cpp
+++ b/src/shared/proparser/qmakebuiltins.cpp
@@ -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());
diff --git a/src/shared/proparser/qmakeglobals.cpp b/src/shared/proparser/qmakeglobals.cpp
index f9002274b3..a77e15448a 100644
--- a/src/shared/proparser/qmakeglobals.cpp
+++ b/src/shared/proparser/qmakeglobals.cpp
@@ -250,11 +250,11 @@ void QMakeGlobals::setDirectories(const QString &input_dir, const QString &outpu
QString QMakeGlobals::getEnv(const QString &var) const
{
-#ifndef QT_BOOTSTRAPPED
- if (!environment.isEmpty())
- return environment.value(var);
-#endif
+#ifdef PROEVALUATOR_SETENV
+ return environment.value(var);
+#else
return QString::fromLocal8Bit(qgetenv(var.toLocal8Bit().constData()));
+#endif
}
QStringList QMakeGlobals::getPathListEnv(const QString &var) const
diff --git a/src/shared/proparser/qmakeglobals.h b/src/shared/proparser/qmakeglobals.h
index 85ab0b73d8..14de0e8bba 100644
--- a/src/shared/proparser/qmakeglobals.h
+++ b/src/shared/proparser/qmakeglobals.h
@@ -100,7 +100,7 @@ public:
QString dir_sep;
QString dirlist_sep;
QString cachefile;
-#ifndef QT_BOOTSTRAPPED
+#ifdef PROEVALUATOR_SETENV
QProcessEnvironment environment;
#endif
QString qmake_abslocation;