forked from qt-creator/qt-creator
Qdb: use new runconfiguration aspect update mechanism
Change-Id: Ib8822ac62d364bbbe8b9fd61b238c841dc39a777 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -86,10 +86,17 @@ QdbRunConfiguration::QdbRunConfiguration(Target *target, Core::Id id)
|
||||
addAspect<WorkingDirectoryAspect>();
|
||||
addAspect<FullCommandLineAspect>(this);
|
||||
|
||||
connect(target, &Target::kitChanged,
|
||||
this, &QdbRunConfiguration::updateTargetInformation);
|
||||
connect(target, &Target::buildSystemUpdated,
|
||||
this, &QdbRunConfiguration::updateTargetInformation);
|
||||
setUpdater([this, target, exeAspect, symbolsAspect] {
|
||||
const BuildTargetInfo bti = buildTargetInfo();
|
||||
const FilePath localExecutable = bti.targetFilePath;
|
||||
const DeployableFile depFile = target->deploymentData().deployableForLocalFile(localExecutable);
|
||||
|
||||
exeAspect->setExecutable(FilePath::fromString(depFile.remoteFilePath()));
|
||||
symbolsAspect->setFilePath(localExecutable);
|
||||
});
|
||||
|
||||
connect(target, &Target::kitChanged, this, &RunConfiguration::update);
|
||||
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
||||
|
||||
setDefaultDisplayName(tr("Run on Boot2Qt Device"));
|
||||
}
|
||||
@@ -107,16 +114,6 @@ ProjectExplorer::RunConfiguration::ConfigurationState QdbRunConfiguration::ensur
|
||||
return Configured;
|
||||
}
|
||||
|
||||
void QdbRunConfiguration::updateTargetInformation()
|
||||
{
|
||||
const BuildTargetInfo bti = buildTargetInfo();
|
||||
const FilePath localExecutable = bti.targetFilePath;
|
||||
const DeployableFile depFile = target()->deploymentData().deployableForLocalFile(localExecutable);
|
||||
|
||||
aspect<ExecutableAspect>()->setExecutable(FilePath::fromString(depFile.remoteFilePath()));
|
||||
aspect<SymbolFileAspect>()->setFilePath(localExecutable);
|
||||
}
|
||||
|
||||
QString QdbRunConfiguration::defaultDisplayName() const
|
||||
{
|
||||
return RunConfigurationFactory::decoratedTargetName(buildKey(), target());
|
||||
|
@@ -48,7 +48,6 @@ public:
|
||||
ConfigurationState ensureConfigured(QString *errorMessage) override;
|
||||
|
||||
private:
|
||||
void updateTargetInformation();
|
||||
QString defaultDisplayName() const;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user