aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-03-07 09:08:40 +0100
committerhjk <hjk@qt.io>2019-03-07 16:06:46 +0000
commitac1b0facc0dd91c5551c4bd1f36c16fe388aa541 (patch)
tree71b4cb83bfce2ef64bd12b205f39194e279fb3cd /src/plugins/remotelinux
parent2f02dcf994d7ef29ba3bbaa97c827db2d7d6bf63 (diff)
ProjectExplorer: De-virtualize EnvironmentAspect::baseEnvironment
Will help to streamline *EnvironmentAspect constructor signature, which in turn will help to have a generic cloning mechanism to clone aspect data, which in turn will help to finally execute on the idea that RunControls should be re-runnable in their original setup and also resilient to changes in the setup while they are running. Change-Id: Ibdaca487c1f7ce043e675fd014fe923a70273639 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/remotelinux')
-rw-r--r--src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp13
-rw-r--r--src/plugins/remotelinux/remotelinuxenvironmentaspect.h2
2 files changed, 6 insertions, 9 deletions
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp b/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp
index cfa23b32190..aaaae8e68fb 100644
--- a/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp
+++ b/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp
@@ -55,14 +55,13 @@ RemoteLinuxEnvironmentAspect::RemoteLinuxEnvironmentAspect(ProjectExplorer::Targ
setConfigWidgetCreator([this, target] {
return new RemoteLinuxEnvironmentAspectWidget(this, target);
});
-}
-Utils::Environment RemoteLinuxEnvironmentAspect::baseEnvironment() const
-{
- Utils::Environment env;
- if (baseEnvironmentBase() == static_cast<int>(RemoteBaseEnvironment))
- env = m_remoteEnvironment;
- return env;
+ setBaseEnvironmentGetter([this] {
+ Utils::Environment env;
+ if (baseEnvironmentBase() == static_cast<int>(RemoteBaseEnvironment))
+ env = m_remoteEnvironment;
+ return env;
+ });
}
Utils::Environment RemoteLinuxEnvironmentAspect::remoteEnvironment() const
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspect.h b/src/plugins/remotelinux/remotelinuxenvironmentaspect.h
index 0ac83cd4281..c4413e07e11 100644
--- a/src/plugins/remotelinux/remotelinuxenvironmentaspect.h
+++ b/src/plugins/remotelinux/remotelinuxenvironmentaspect.h
@@ -38,8 +38,6 @@ class REMOTELINUX_EXPORT RemoteLinuxEnvironmentAspect : public ProjectExplorer::
public:
RemoteLinuxEnvironmentAspect(ProjectExplorer::Target *target);
- Utils::Environment baseEnvironment() const override;
-
Utils::Environment remoteEnvironment() const;
void setRemoteEnvironment(const Utils::Environment &env);