ProjectExplorer: Shift full FilePath creation into Executable aspect

Less need for correction: When a target is given, the executable
produced by the aspect will be on the target device.

Change-Id: I86c38e9f9fa5b4d4fe9b2ef7f21a0b3aa5b28670
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-05-11 13:54:42 +02:00
parent 8737dfd962
commit 72a2083cd1
15 changed files with 47 additions and 51 deletions

View File

@@ -52,7 +52,7 @@ public:
: RunConfiguration(target, id)
{
auto envAspect = addAspect<LocalEnvironmentAspect>(target);
addAspect<ExecutableAspect>();
addAspect<ExecutableAspect>(target);
addAspect<ArgumentsAspect>();
addAspect<WorkingDirectoryAspect>(envAspect);
addAspect<TerminalAspect>();
@@ -89,7 +89,7 @@ public:
NimbleTestConfiguration(ProjectExplorer::Target *target, Utils::Id id)
: RunConfiguration(target, id)
{
addAspect<ExecutableAspect>()->setExecutable(Nim::nimblePathFromKit(target->kit()));
addAspect<ExecutableAspect>(target)->setExecutable(Nim::nimblePathFromKit(target->kit()));
addAspect<ArgumentsAspect>()->setArguments("test");
addAspect<WorkingDirectoryAspect>(nullptr)->setDefaultWorkingDirectory(project()->projectDirectory());
addAspect<TerminalAspect>();