From c925400bdecd94c7eac65a7e31aa4f8fd010bb5b Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 2 Mar 2017 11:29:08 +0100 Subject: [PATCH] qmake: Check for QT_CONFIG(process) in qmakebuiltins The code in question is obviously checking for support of QProcess, not for general bootstrap mode. You can manually disable QProcess, in which case it is still not available after bootstrapping is done. Change-Id: Ia99810b8900621911a31912034358a01af4f18a0 Reviewed-by: Oswald Buddenhagen --- qmake/library/qmakebuiltins.cpp | 6 +++--- qmake/library/qmakeevaluator.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qmake/library/qmakebuiltins.cpp b/qmake/library/qmakebuiltins.cpp index b30373b5966..d61a6c1b151 100644 --- a/qmake/library/qmakebuiltins.cpp +++ b/qmake/library/qmakebuiltins.cpp @@ -469,7 +469,7 @@ QMakeEvaluator::writeFile(const QString &ctx, const QString &fn, QIODevice::Open return ReturnTrue; } -#ifndef QT_BOOTSTRAPPED +#if QT_CONFIG(process) void QMakeEvaluator::runProcess(QProcess *proc, const QString &command) const { proc->setWorkingDirectory(currentDirectory()); @@ -490,7 +490,7 @@ void QMakeEvaluator::runProcess(QProcess *proc, const QString &command) const QByteArray QMakeEvaluator::getCommandOutput(const QString &args, int *exitCode) const { QByteArray out; -#ifndef QT_BOOTSTRAPPED +#if QT_CONFIG(process) QProcess proc; runProcess(&proc, args); *exitCode = (proc.exitStatus() == QProcess::NormalExit) ? proc.exitCode() : -1; @@ -1711,7 +1711,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( #ifdef PROEVALUATOR_FULL if (m_cumulative) // Anything else would be insanity return ReturnFalse; -#ifndef QT_BOOTSTRAPPED +#if QT_CONFIG(process) QProcess proc; proc.setProcessChannelMode(QProcess::ForwardedChannels); runProcess(&proc, args.at(0).toQString(m_tmp2)); diff --git a/qmake/library/qmakeevaluator.h b/qmake/library/qmakeevaluator.h index 544c257f074..5948bd7d149 100644 --- a/qmake/library/qmakeevaluator.h +++ b/qmake/library/qmakeevaluator.h @@ -44,7 +44,7 @@ #include #include #include -#ifndef QT_BOOTSTRAPPED +#if QT_CONFIG(process) # include #else # include @@ -237,7 +237,7 @@ public: VisitReturn writeFile(const QString &ctx, const QString &fn, QIODevice::OpenMode mode, bool exe, const QString &contents); -#ifndef QT_BOOTSTRAPPED +#if QT_CONFIG(process) void runProcess(QProcess *proc, const QString &command) const; #endif QByteArray getCommandOutput(const QString &args, int *exitCode) const;