aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonrunconfiguration.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-06-21 14:26:33 +0200
committerhjk <hjk@qt.io>2023-06-23 12:06:22 +0000
commit4a17a26a6df1c020e286cb126459e046c7f6ae9e (patch)
treec07a0f8b6201cd1f20209349e5433a4dc50be6a6 /src/plugins/python/pythonrunconfiguration.cpp
parent31c6ff495a6608254ee90f3a1a4baf44f2372df1 (diff)
Python: Allow redirecting the display for remote setups
Change-Id: I83baa9c74a1586590147668c9fea661018101776 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/python/pythonrunconfiguration.cpp')
-rw-r--r--src/plugins/python/pythonrunconfiguration.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/python/pythonrunconfiguration.cpp b/src/plugins/python/pythonrunconfiguration.cpp
index e7c5b4dee14..42cd8a8e9ae 100644
--- a/src/plugins/python/pythonrunconfiguration.cpp
+++ b/src/plugins/python/pythonrunconfiguration.cpp
@@ -197,6 +197,14 @@ PythonRunConfiguration::PythonRunConfiguration(Target *target, Id id)
addAspect<WorkingDirectoryAspect>(macroExpander(), nullptr);
addAspect<TerminalAspect>();
+ if (HostOsInfo::isAnyUnixHost())
+ addAspect<X11ForwardingAspect>(macroExpander());
+
+ setRunnableModifier([this](Runnable &r) {
+ if (const auto * const forwardingAspect = aspect<X11ForwardingAspect>())
+ r.extraData.insert("Ssh.X11ForwardToDisplay", forwardingAspect->display());
+ });
+
setCommandLineGetter([bufferedAspect, interpreterAspect, argumentsAspect, scriptAspect] {
CommandLine cmd{interpreterAspect->currentInterpreter().command};
if (!bufferedAspect->value())