diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp index 8639bc00cee..12bc39a7c4d 100644 --- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp +++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp @@ -49,21 +49,6 @@ bool CustomExecutableRunConfiguration::isEnabled(Id) const 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 { if (executable().isEmpty()) diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.h b/src/plugins/projectexplorer/customexecutablerunconfiguration.h index ced9892c016..3b9e8996b8a 100644 --- a/src/plugins/projectexplorer/customexecutablerunconfiguration.h +++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.h @@ -20,7 +20,6 @@ public: QString defaultDisplayName() const; private: - Utils::ProcessRunData runnable() const override; bool isEnabled(Utils::Id) const override; Tasks checkForIssues() const override; diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index a0c3aa2e6dd..97d467fbc75 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -425,6 +425,13 @@ ProcessRunData RunConfiguration::runnable() const r.environment = environmentAspect->environment(); if (m_runnableModifier) 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; }