diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-11-01 12:24:03 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-11-19 09:13:00 +0000 |
commit | d775c26bcd072252075dc82dc35bf22d53c6b7f7 (patch) | |
tree | 6ef9ec25db26306858675b9d479ec94f3ddbd22f /src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp | |
parent | 424923817cd018767671e0e88b90deef3fd4917a (diff) |
RemoteLinux: Offer X11 forwarding in run configurations
Change-Id: I736d76e072a97fa148286c30c4ca36bf4c1253e2
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp')
-rw-r--r-- | src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp index b8ed968a9b9..e19b5b34f43 100644 --- a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp +++ b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp @@ -27,12 +27,15 @@ #include "remotelinux_constants.h" #include "remotelinuxenvironmentaspect.h" +#include "remotelinuxx11forwardingaspect.h" #include <projectexplorer/runconfigurationaspects.h> #include <projectexplorer/target.h> #include <qtsupport/qtoutputformatter.h> +#include <utils/hostosinfo.h> + using namespace ProjectExplorer; using namespace Utils; @@ -58,6 +61,8 @@ RemoteLinuxCustomRunConfiguration::RemoteLinuxCustomRunConfiguration(Target *tar addAspect<ArgumentsAspect>(); addAspect<WorkingDirectoryAspect>(); addAspect<RemoteLinuxEnvironmentAspect>(target); + if (Utils::HostOsInfo::isAnyUnixHost()) + addAspect<X11ForwardingAspect>(); setDefaultDisplayName(runConfigDefaultDisplayName()); setOutputFormatter<QtSupport::QtOutputFormatter>(); @@ -94,6 +99,14 @@ QString RemoteLinuxCustomRunConfiguration::runConfigDefaultDisplayName() return RunConfigurationFactory::decoratedTargetName(display, target()); } +Runnable RemoteLinuxCustomRunConfiguration::runnable() const +{ + ProjectExplorer::Runnable r = RunConfiguration::runnable(); + r.extraData.insert("Ssh.X11ForwardToDisplay", + aspect<X11ForwardingAspect>()->display(macroExpander())); + return r; +} + // RemoteLinuxCustomRunConfigurationFactory RemoteLinuxCustomRunConfigurationFactory::RemoteLinuxCustomRunConfigurationFactory() |