forked from qt-creator/qt-creator
RemoteLinux: Use new runconfiguration aspect update mechanism
Change-Id: I8f518f323e8d2437809bdffc21492e4238df10d5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -69,10 +69,19 @@ RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Target *target, Core::I
|
|||||||
if (HostOsInfo::isAnyUnixHost())
|
if (HostOsInfo::isAnyUnixHost())
|
||||||
addAspect<X11ForwardingAspect>();
|
addAspect<X11ForwardingAspect>();
|
||||||
|
|
||||||
connect(target, &Target::buildSystemUpdated,
|
setUpdater([this, target, exeAspect, symbolsAspect] {
|
||||||
this, &RemoteLinuxRunConfiguration::updateTargetInformation);
|
BuildTargetInfo bti = buildTargetInfo();
|
||||||
connect(target, &Target::kitChanged,
|
const FilePath localExecutable = bti.targetFilePath;
|
||||||
this, &RemoteLinuxRunConfiguration::updateTargetInformation);
|
DeployableFile depFile = target->deploymentData().deployableForLocalFile(localExecutable);
|
||||||
|
|
||||||
|
exeAspect->setExecutable(FilePath::fromString(depFile.remoteFilePath()));
|
||||||
|
symbolsAspect->setFilePath(localExecutable);
|
||||||
|
|
||||||
|
emit enabledChanged();
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
||||||
|
connect(target, &Target::kitChanged, this, &RunConfiguration::update);
|
||||||
}
|
}
|
||||||
|
|
||||||
Runnable RemoteLinuxRunConfiguration::runnable() const
|
Runnable RemoteLinuxRunConfiguration::runnable() const
|
||||||
@@ -84,18 +93,6 @@ Runnable RemoteLinuxRunConfiguration::runnable() const
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxRunConfiguration::updateTargetInformation()
|
|
||||||
{
|
|
||||||
BuildTargetInfo bti = buildTargetInfo();
|
|
||||||
const FilePath localExecutable = bti.targetFilePath;
|
|
||||||
DeployableFile depFile = target()->deploymentData().deployableForLocalFile(localExecutable);
|
|
||||||
|
|
||||||
aspect<ExecutableAspect>()->setExecutable(FilePath::fromString(depFile.remoteFilePath()));
|
|
||||||
aspect<SymbolFileAspect>()->setFilePath(localExecutable);
|
|
||||||
|
|
||||||
emit enabledChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *RemoteLinuxRunConfiguration::IdPrefix = "RemoteLinuxRunConfiguration:";
|
const char *RemoteLinuxRunConfiguration::IdPrefix = "RemoteLinuxRunConfiguration:";
|
||||||
|
|
||||||
|
|
||||||
|
@@ -42,9 +42,6 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
ProjectExplorer::Runnable runnable() const override;
|
ProjectExplorer::Runnable runnable() const override;
|
||||||
|
|
||||||
private:
|
|
||||||
void updateTargetInformation();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RemoteLinuxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
class RemoteLinuxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
||||||
|
Reference in New Issue
Block a user