ProjectExplorer: Add executable() accessor to RunConfiguration

Amends f6c276daf0, which was a quick fix for 4.9.

Change-Id: I94281af6a9a0d0bfe197ce836488f708d5bd677d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-05-23 18:10:34 +02:00
parent b7755b18c3
commit a9d2e14dca
7 changed files with 36 additions and 18 deletions

View File

@@ -279,6 +279,9 @@ PythonRunConfiguration::PythonRunConfiguration(Target *target, Core::Id id)
addAspect<TerminalAspect>();
setOutputFormatter<PythonOutputFormatter>();
setExecutableGetter([this] {
return FileName::fromString(aspect<InterpreterAspect>()->value());
});
connect(target, &Target::applicationTargetsChanged,
this, &PythonRunConfiguration::updateTargetInformation);
@@ -300,7 +303,7 @@ Runnable PythonRunConfiguration::runnable() const
QtcProcess::addArg(&r.commandLineArguments, mainScript());
QtcProcess::addArgs(&r.commandLineArguments,
aspect<ArgumentsAspect>()->arguments(macroExpander()));
r.executable = aspect<InterpreterAspect>()->value();
r.executable = executable().toString();
r.environment = aspect<EnvironmentAspect>()->environment();
return r;
}