forked from qt-creator/qt-creator
ProjectExplorer/RemoteLinux: Consolidate X11ForwardingAspect handling
Change-Id: I7e74f58ab50c84c74ba65f9f64aaa4d0ea73bbb6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -403,6 +403,8 @@ Runnable RunConfiguration::runnable() const
|
||||
r.workingDirectory = r.command.executable().withNewMappedPath(workingDirectoryAspect->workingDirectory());
|
||||
if (auto environmentAspect = aspect<EnvironmentAspect>())
|
||||
r.environment = environmentAspect->environment();
|
||||
if (auto forwardingAspect = aspect<X11ForwardingAspect>())
|
||||
r.extraData.insert("Ssh.X11ForwardToDisplay", forwardingAspect->display());
|
||||
if (m_runnableModifier)
|
||||
m_runnableModifier(r);
|
||||
return r;
|
||||
|
@@ -200,11 +200,6 @@ PythonRunConfiguration::PythonRunConfiguration(Target *target, Id id)
|
||||
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())
|
||||
|
@@ -171,8 +171,6 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id)
|
||||
setRunnableModifier([this](Runnable &r) {
|
||||
const QmlBuildSystem *bs = static_cast<QmlBuildSystem *>(activeBuildSystem());
|
||||
r.workingDirectory = bs->targetDirectory();
|
||||
if (const auto * const forwardingAspect = aspect<X11ForwardingAspect>())
|
||||
r.extraData.insert("Ssh.X11ForwardToDisplay", forwardingAspect->display());
|
||||
});
|
||||
|
||||
setDisplayName(Tr::tr("QML Utility", "QMLRunConfiguration display name."));
|
||||
|
@@ -52,11 +52,6 @@ RemoteLinuxCustomRunConfiguration::RemoteLinuxCustomRunConfiguration(Target *tar
|
||||
if (HostOsInfo::isAnyUnixHost())
|
||||
addAspect<X11ForwardingAspect>(macroExpander());
|
||||
|
||||
setRunnableModifier([this](Runnable &r) {
|
||||
if (const auto * const forwardingAspect = aspect<X11ForwardingAspect>())
|
||||
r.extraData.insert("Ssh.X11ForwardToDisplay", forwardingAspect->display());
|
||||
});
|
||||
|
||||
setDefaultDisplayName(runConfigDefaultDisplayName());
|
||||
}
|
||||
|
||||
|
@@ -73,11 +73,6 @@ RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Target *target, Id id)
|
||||
libAspect->setEnabled(buildDevice == runDevice);
|
||||
});
|
||||
|
||||
setRunnableModifier([this](Runnable &r) {
|
||||
if (const auto * const forwardingAspect = aspect<X11ForwardingAspect>())
|
||||
r.extraData.insert("Ssh.X11ForwardToDisplay", forwardingAspect->display());
|
||||
});
|
||||
|
||||
envAspect->addModifier([this, libAspect](Environment &env) {
|
||||
BuildTargetInfo bti = buildTargetInfo();
|
||||
if (bti.runEnvModifier)
|
||||
|
Reference in New Issue
Block a user