forked from qt-creator/qt-creator
Qnx: Add QnxRunConfiguration::doAdditionalSetup()
Same principle as in b526d789cf
.
Change-Id: I79b69f709ab401b46d2edef3b5a6b0672e30eaff
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -68,22 +68,14 @@ QnxRunConfiguration::QnxRunConfiguration(Target *target, Core::Id id)
|
||||
libAspect->setLabelText(tr("Path to Qt libraries on device"));
|
||||
libAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay);
|
||||
|
||||
auto updateTargetInformation = [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::deploymentDataChanged, this, updateTargetInformation);
|
||||
connect(target, &Target::applicationTargetsChanged, this, updateTargetInformation);
|
||||
connect(target->project(), &Project::parsingFinished, this, updateTargetInformation);
|
||||
connect(target, &Target::kitChanged, this, updateTargetInformation);
|
||||
connect(target, &Target::deploymentDataChanged,
|
||||
this, &QnxRunConfiguration::updateTargetInformation);
|
||||
connect(target, &Target::applicationTargetsChanged,
|
||||
this, &QnxRunConfiguration::updateTargetInformation);
|
||||
connect(target->project(), &Project::parsingFinished,
|
||||
this, &QnxRunConfiguration::updateTargetInformation);
|
||||
connect(target, &Target::kitChanged,
|
||||
this, &QnxRunConfiguration::updateTargetInformation);
|
||||
}
|
||||
|
||||
Runnable QnxRunConfiguration::runnable() const
|
||||
@@ -100,6 +92,22 @@ Runnable QnxRunConfiguration::runnable() const
|
||||
return r;
|
||||
}
|
||||
|
||||
void QnxRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &)
|
||||
{
|
||||
updateTargetInformation();
|
||||
}
|
||||
|
||||
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,6 +48,9 @@ public:
|
||||
|
||||
private:
|
||||
ProjectExplorer::Runnable runnable() const override;
|
||||
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &) override;
|
||||
|
||||
void updateTargetInformation();
|
||||
};
|
||||
|
||||
class QnxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
||||
|
Reference in New Issue
Block a user