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())
|
||||
addAspect<X11ForwardingAspect>();
|
||||
|
||||
connect(target, &Target::buildSystemUpdated,
|
||||
this, &RemoteLinuxRunConfiguration::updateTargetInformation);
|
||||
connect(target, &Target::kitChanged,
|
||||
this, &RemoteLinuxRunConfiguration::updateTargetInformation);
|
||||
setUpdater([this, target, exeAspect, symbolsAspect] {
|
||||
BuildTargetInfo bti = buildTargetInfo();
|
||||
const FilePath localExecutable = bti.targetFilePath;
|
||||
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
|
||||
@@ -84,18 +93,6 @@ Runnable RemoteLinuxRunConfiguration::runnable() const
|
||||
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:";
|
||||
|
||||
|
||||
|
@@ -42,9 +42,6 @@ public:
|
||||
|
||||
protected:
|
||||
ProjectExplorer::Runnable runnable() const override;
|
||||
|
||||
private:
|
||||
void updateTargetInformation();
|
||||
};
|
||||
|
||||
class RemoteLinuxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
||||
|
Reference in New Issue
Block a user