diff options
author | hjk <hjk@qt.io> | 2018-09-10 12:41:51 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2018-09-10 11:14:47 +0000 |
commit | 5bc0b6ce3317849632208e5e0029246402e06160 (patch) | |
tree | 46ddc9c35329558e1edddd903d1def1651d3ff52 /src/plugins/projectexplorer/runconfigurationaspects.h | |
parent | a865fa513b6f5f5cf1556da524d0bf3552a9286f (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/runconfigurationaspects.h')
-rw-r--r-- | src/plugins/projectexplorer/runconfigurationaspects.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/runconfigurationaspects.h b/src/plugins/projectexplorer/runconfigurationaspects.h index 352b208a1f..e609ee73b7 100644 --- a/src/plugins/projectexplorer/runconfigurationaspects.h +++ b/src/plugins/projectexplorer/runconfigurationaspects.h @@ -27,6 +27,7 @@ #include "runconfiguration.h" #include "applicationlauncher.h" +#include "environmentaspect.h" #include <utils/fileutils.h> #include <utils/pathchooser.h> @@ -70,7 +71,8 @@ class PROJECTEXPLORER_EXPORT WorkingDirectoryAspect : public IRunConfigurationAs Q_OBJECT public: - explicit WorkingDirectoryAspect(RunConfiguration *runConfig); + WorkingDirectoryAspect(RunConfiguration *runConfig, + EnvironmentAspect *envAspect = nullptr); void addToConfigurationLayout(QFormLayout *layout) override; @@ -87,6 +89,7 @@ private: void resetPath(); QString keyForDefaultWd() const; + EnvironmentAspect * const m_envAspect = nullptr; Utils::FileName m_workingDirectory; Utils::FileName m_defaultWorkingDirectory; QPointer<Utils::PathChooser> m_chooser; |