forked from qt-creator/qt-creator
Re-inline some of the RunConfiguration::setUpdater()
... after the latest 4.11 -> master merge Change-Id: I04352c6bd83edc8853598b69570844714d1bb60a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -86,7 +86,15 @@ QdbRunConfiguration::QdbRunConfiguration(Target *target, Core::Id id)
|
||||
addAspect<WorkingDirectoryAspect>();
|
||||
addAspect<FullCommandLineAspect>(this);
|
||||
|
||||
setUpdater([this] { 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::buildSystemUpdated, this, &RunConfiguration::update);
|
||||
|
||||
setDefaultDisplayName(tr("Run on Boot2Qt Device"));
|
||||
@@ -102,16 +110,6 @@ Tasks QdbRunConfiguration::checkForIssues() const
|
||||
return tasks;
|
||||
}
|
||||
|
||||
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());
|
||||
|
||||
@@ -47,7 +47,6 @@ public:
|
||||
|
||||
private:
|
||||
ProjectExplorer::Tasks checkForIssues() const override;
|
||||
void updateTargetInformation();
|
||||
QString defaultDisplayName() const;
|
||||
};
|
||||
|
||||
|
||||
@@ -69,7 +69,15 @@ QnxRunConfiguration::QnxRunConfiguration(Target *target, Core::Id id)
|
||||
libAspect->setLabelText(tr("Path to Qt libraries on device"));
|
||||
libAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay);
|
||||
|
||||
setUpdater([this] { 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);
|
||||
emit enabledChanged();
|
||||
});
|
||||
|
||||
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
||||
}
|
||||
@@ -88,17 +96,6 @@ Runnable QnxRunConfiguration::runnable() const
|
||||
return r;
|
||||
}
|
||||
|
||||
void QnxRunConfiguration::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);
|
||||
emit enabledChanged();
|
||||
}
|
||||
|
||||
// QnxRunConfigurationFactory
|
||||
|
||||
QnxRunConfigurationFactory::QnxRunConfigurationFactory()
|
||||
|
||||
@@ -48,8 +48,6 @@ public:
|
||||
|
||||
private:
|
||||
ProjectExplorer::Runnable runnable() const override;
|
||||
|
||||
void updateTargetInformation();
|
||||
};
|
||||
|
||||
class QnxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
||||
|
||||
@@ -69,7 +69,16 @@ RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Target *target, Core::I
|
||||
if (HostOsInfo::isAnyUnixHost())
|
||||
addAspect<X11ForwardingAspect>();
|
||||
|
||||
setUpdater([this] { 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);
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
// RemoteLinuxRunConfigurationFactory
|
||||
|
||||
RemoteLinuxRunConfigurationFactory::RemoteLinuxRunConfigurationFactory()
|
||||
|
||||
@@ -41,7 +41,6 @@ public:
|
||||
|
||||
private:
|
||||
ProjectExplorer::Runnable runnable() const override;
|
||||
void updateTargetInformation();
|
||||
};
|
||||
|
||||
class RemoteLinuxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
||||
|
||||
Reference in New Issue
Block a user