summaryrefslogtreecommitdiffstats
path: root/tools/configure/environment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/configure/environment.cpp')
-rw-r--r--tools/configure/environment.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 43cfc06599..0365340833 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -431,7 +431,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
Taken from qmake's system() command.
*/
-QString Environment::execute(const QString &command)
+QString Environment::execute(const QString &command, int *returnCode)
{
QString output;
FILE *proc = _popen(command.toLatin1().constData(), "r");
@@ -443,8 +443,11 @@ QString Environment::execute(const QString &command)
buff[read_in] = '\0';
output += buff;
}
- if (proc)
- _pclose(proc);
+ if (proc) {
+ int r = _pclose(proc);
+ if (returnCode)
+ *returnCode = r;
+ }
return output;
}