forked from qt-creator/qt-creator
ProjectExplorer: Merge CustomExecutableRunConfiguration::runnable()
... into parent class implementation. This way, the executable expansion will be done for all sub-classes, the remote custom run configurations being the most relevant ones. Task-number: QTCREATORBUG-30925 Change-Id: Id7715d9f60338767c0623fa33749ef18338ae479 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -49,21 +49,6 @@ bool CustomExecutableRunConfiguration::isEnabled(Id) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessRunData CustomExecutableRunConfiguration::runnable() const
|
|
||||||
{
|
|
||||||
ProcessRunData r;
|
|
||||||
r.command = commandLine();
|
|
||||||
r.environment = environment.environment();
|
|
||||||
r.workingDirectory = workingDir();
|
|
||||||
|
|
||||||
if (!r.command.isEmpty()) {
|
|
||||||
const FilePath expanded = macroExpander()->expand(r.command.executable());
|
|
||||||
r.command.setExecutable(expanded);
|
|
||||||
}
|
|
||||||
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString CustomExecutableRunConfiguration::defaultDisplayName() const
|
QString CustomExecutableRunConfiguration::defaultDisplayName() const
|
||||||
{
|
{
|
||||||
if (executable().isEmpty())
|
if (executable().isEmpty())
|
||||||
|
@@ -20,7 +20,6 @@ public:
|
|||||||
QString defaultDisplayName() const;
|
QString defaultDisplayName() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Utils::ProcessRunData runnable() const override;
|
|
||||||
bool isEnabled(Utils::Id) const override;
|
bool isEnabled(Utils::Id) const override;
|
||||||
Tasks checkForIssues() const override;
|
Tasks checkForIssues() const override;
|
||||||
|
|
||||||
|
@@ -425,6 +425,13 @@ ProcessRunData RunConfiguration::runnable() const
|
|||||||
r.environment = environmentAspect->environment();
|
r.environment = environmentAspect->environment();
|
||||||
if (m_runnableModifier)
|
if (m_runnableModifier)
|
||||||
m_runnableModifier(r);
|
m_runnableModifier(r);
|
||||||
|
|
||||||
|
// TODO: Do expansion in commandLine()?
|
||||||
|
if (!r.command.isEmpty()) {
|
||||||
|
const FilePath expanded = macroExpander()->expand(r.command.executable());
|
||||||
|
r.command.setExecutable(expanded);
|
||||||
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user