diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-05-06 15:18:09 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-05-08 14:17:54 +0200 |
commit | 97ece795e092cf2b26f7ec84bdd5135fa70a8876 (patch) | |
tree | 6fdc04078e0c54b64b87c4d0eb44e177a2010a36 /src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp | |
parent | d0e54d8e554d7837ea8624236c20a7f83bc7656b (diff) |
RemoteLinux: Move environment handling entirely into the aspect class.
There is no reason why the run configuration should add its own logic on
top of what the aspect class does.
This makes RemoteLinuxRunConfiguration::environment() purely a
convenience method.
Change-Id: I80c4ede9a35388e7d3727fff90531accd7fc08de
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp')
-rw-r--r-- | src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp b/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp index d06c6d88134..2f6c2fac9d1 100644 --- a/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp +++ b/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp @@ -68,9 +68,13 @@ QString RemoteLinuxEnvironmentAspect::baseEnvironmentDisplayName(int base) const Utils::Environment RemoteLinuxEnvironmentAspect::baseEnvironment() const { + Utils::Environment env; if (baseEnvironmentBase() == static_cast<int>(RemoteBaseEnvironment)) - return m_remoteEnvironment; - return Utils::Environment(); + env = m_remoteEnvironment; + const QString displayKey = QLatin1String("DISPLAY"); + if (!env.hasKey(displayKey)) + env.appendOrSet(displayKey, QLatin1String(":0.0")); + return env; } AbstractRemoteLinuxRunConfiguration *RemoteLinuxEnvironmentAspect::runConfiguration() const |