aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-09-10 12:41:51 +0200
committerhjk <hjk@qt.io>2018-09-10 11:14:47 +0000
commit5bc0b6ce3317849632208e5e0029246402e06160 (patch)
tree46ddc9c35329558e1edddd903d1def1651d3ff52 /src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
parenta865fa513b6f5f5cf1556da524d0bf3552a9286f (diff)
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>
Diffstat (limited to 'src/plugins/projectexplorer/customexecutablerunconfiguration.cpp')
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
index 708e25477c..44f578ac9f 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
@@ -86,7 +86,10 @@ private:
CustomExecutableDialog::CustomExecutableDialog(RunConfiguration *rc)
: QDialog(Core::ICore::dialogParent()),
- m_rc(rc), m_arguments(rc), m_workingDirectory(rc), m_terminal(rc)
+ m_rc(rc),
+ m_arguments(rc),
+ m_workingDirectory(rc, rc->extraAspect<EnvironmentAspect>()),
+ m_terminal(rc)
{
auto vbox = new QVBoxLayout(this);
vbox->addWidget(new QLabel(tr("Could not find the executable, please specify one.")));
@@ -185,7 +188,7 @@ CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Target *targe
exeAspect->setEnvironment(envAspect->environment());
addAspect<ArgumentsAspect>();
- addAspect<WorkingDirectoryAspect>();
+ addAspect<WorkingDirectoryAspect>(envAspect);
addAspect<TerminalAspect>();
connect(envAspect, &EnvironmentAspect::environmentChanged,