forked from qt-creator/qt-creator
ProcessParameters: Allow to set the ProcessMode
Change-Id: I45db21d8785cfaecd8d524b4acda32e352640282 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -190,6 +190,7 @@ bool AbstractProcessStep::setupProcess(Process &process)
|
||||
// For example Clang uses PWD for paths in debug info, see QTCREATORBUG-23788
|
||||
Environment envWithPwd = d->m_param.environment();
|
||||
envWithPwd.set("PWD", workingDir.path());
|
||||
process.setProcessMode(d->m_param.processMode());
|
||||
process.setEnvironment(envWithPwd);
|
||||
process.setCommand({d->m_param.effectiveCommand(), d->m_param.effectiveArguments(),
|
||||
CommandLine::Raw});
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
#include <utils/processinterface.h>
|
||||
#include <utils/processenums.h>
|
||||
|
||||
namespace Utils {
|
||||
class MacroExpander;
|
||||
@@ -31,6 +32,9 @@ public:
|
||||
void setMacroExpander(Utils::MacroExpander *mx) { m_macroExpander = mx; }
|
||||
Utils::MacroExpander *macroExpander() const { return m_macroExpander; }
|
||||
|
||||
void setProcessMode(Utils::ProcessMode mode) { m_processMode = mode; }
|
||||
Utils::ProcessMode processMode() const { return m_processMode; }
|
||||
|
||||
/// Get the fully expanded working directory:
|
||||
Utils::FilePath effectiveWorkingDirectory() const;
|
||||
/// Get the fully expanded command name to run:
|
||||
@@ -54,6 +58,7 @@ private:
|
||||
mutable Utils::FilePath m_effectiveCommand;
|
||||
mutable QString m_effectiveArguments;
|
||||
mutable bool m_commandMissing = false;
|
||||
mutable Utils::ProcessMode m_processMode = Utils::ProcessMode::Reader;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
Reference in New Issue
Block a user