forked from qt-creator/qt-creator
ProjectExplorer: Make WorkingDirectoryAspect less dependent on runconfig
This was one of the genuine users of the run config pointer in the aspect base class. Instead of using that stored pointer to retrieve the relevant environment aspect pointer later, pass and store this env aspect pointer at construction time. Change-Id: Icbdeb9ad0fe341e4003fb544c542064801aa170f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -53,10 +53,11 @@ CMakeRunConfiguration::CMakeRunConfiguration(Target *target, Core::Id id)
|
||||
if (qt)
|
||||
env.prependOrSetPath(qt->qmakeProperty("QT_INSTALL_BINS"));
|
||||
};
|
||||
addAspect<LocalEnvironmentAspect>(cmakeRunEnvironmentModifier);
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>(cmakeRunEnvironmentModifier);
|
||||
|
||||
addAspect<ExecutableAspect>();
|
||||
addAspect<ArgumentsAspect>();
|
||||
addAspect<WorkingDirectoryAspect>();
|
||||
addAspect<WorkingDirectoryAspect>(envAspect);
|
||||
addAspect<TerminalAspect>();
|
||||
|
||||
connect(target->project(), &Project::parsingFinished,
|
||||
|
||||
Reference in New Issue
Block a user