aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-05-29 17:41:15 +0200
committerhjk <hjk@qt.io>2019-06-03 13:32:48 +0000
commit2c88b5b90fdce7d0360dd9f93a7a868b811a8959 (patch)
treef1889d3c8fb02a182644b053ef13308b40f4c680
parent959fec76dc257515a7bca74c00fde645f50e84c5 (diff)
ProjectExplorer: Add a ProcessParameters::setCommandLine()
Change-Id: I55add792988b22af56934dde237cf64b6f0c90d4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/plugins/projectexplorer/processparameters.cpp8
-rw-r--r--src/plugins/projectexplorer/processparameters.h7
2 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/processparameters.cpp b/src/plugins/projectexplorer/processparameters.cpp
index 350aa7c90f..f535cc120e 100644
--- a/src/plugins/projectexplorer/processparameters.cpp
+++ b/src/plugins/projectexplorer/processparameters.cpp
@@ -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.
*/
diff --git a/src/plugins/projectexplorer/processparameters.h b/src/plugins/projectexplorer/processparameters.h
index 3e08e6bb85..c87ede7d5b 100644
--- a/src/plugins/projectexplorer/processparameters.h
+++ b/src/plugins/projectexplorer/processparameters.h
@@ -30,7 +30,10 @@
#include <utils/environment.h>
#include <utils/fileutils.h>
-namespace Utils { class MacroExpander; }
+namespace Utils {
+class CommandLine;
+class MacroExpander;
+} // Utils
namespace ProjectExplorer {
@@ -40,6 +43,8 @@ class PROJECTEXPLORER_EXPORT ProcessParameters
public:
ProcessParameters();
+ void setCommandLine(const Utils::CommandLine &cmdLine);
+
void setCommand(const Utils::FilePath &cmd);
Utils::FilePath command() const { return m_command; }