Python: Allow redirecting the display for remote setups

Change-Id: I83baa9c74a1586590147668c9fea661018101776
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2023-06-21 14:26:33 +02:00
parent 31c6ff495a
commit 4a17a26a6d

View File

@@ -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())