ProjectExplorer: Add a ProcessParameters::setCommandLine()

Change-Id: I55add792988b22af56934dde237cf64b6f0c90d4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-05-29 17:41:15 +02:00
parent 959fec76dc
commit 2c88b5b90f
2 changed files with 14 additions and 1 deletions

View File

@@ -54,6 +54,14 @@ ProcessParameters::ProcessParameters() :
{ {
} }
void ProcessParameters::setCommandLine(const CommandLine &cmdLine)
{
m_command = cmdLine.executable();
m_arguments = cmdLine.arguments();
m_effectiveCommand.clear();
m_effectiveArguments.clear();
}
/*! /*!
Sets the executable to run. Sets the executable to run.
*/ */

View File

@@ -30,7 +30,10 @@
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
namespace Utils { class MacroExpander; } namespace Utils {
class CommandLine;
class MacroExpander;
} // Utils
namespace ProjectExplorer { namespace ProjectExplorer {
@@ -40,6 +43,8 @@ class PROJECTEXPLORER_EXPORT ProcessParameters
public: public:
ProcessParameters(); ProcessParameters();
void setCommandLine(const Utils::CommandLine &cmdLine);
void setCommand(const Utils::FilePath &cmd); void setCommand(const Utils::FilePath &cmd);
Utils::FilePath command() const { return m_command; } Utils::FilePath command() const { return m_command; }