forked from qt-creator/qt-creator
ProjectExplorer: Add a RunConfiguration::setRunnableModifier()
To override RunConfiguration::runnable() behavior without the need for subclassing. Will be useful for the docker plugin. Change-Id: I9e8511faa95355038b08c3e3be24429d66a5253f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -307,6 +307,11 @@ CommandLine RunConfiguration::commandLine() const
|
||||
return m_commandLineGetter();
|
||||
}
|
||||
|
||||
void RunConfiguration::setRunnableModifier(const RunnableModifier &runnableModifier)
|
||||
{
|
||||
m_runnableModifier = runnableModifier;
|
||||
}
|
||||
|
||||
void RunConfiguration::update()
|
||||
{
|
||||
if (m_updater)
|
||||
@@ -398,6 +403,8 @@ Runnable RunConfiguration::runnable() const
|
||||
r.workingDirectory = workingDirectoryAspect->workingDirectory(macroExpander()).toString();
|
||||
if (auto environmentAspect = aspect<EnvironmentAspect>())
|
||||
r.environment = environmentAspect->environment();
|
||||
if (m_runnableModifier)
|
||||
m_runnableModifier(r);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user