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->setLabelText(tr("Path to Qt libraries on device"));
|
||||||
libAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay);
|
libAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay);
|
||||||
|
|
||||||
auto updateTargetInformation = [this, target, exeAspect, symbolsAspect] {
|
connect(target, &Target::deploymentDataChanged,
|
||||||
|
this, &QnxRunConfiguration::updateTargetInformation);
|
||||||
const BuildTargetInfo bti = buildTargetInfo();
|
connect(target, &Target::applicationTargetsChanged,
|
||||||
const FilePath localExecutable = bti.targetFilePath;
|
this, &QnxRunConfiguration::updateTargetInformation);
|
||||||
const DeployableFile depFile = target->deploymentData().deployableForLocalFile(localExecutable);
|
connect(target->project(), &Project::parsingFinished,
|
||||||
|
this, &QnxRunConfiguration::updateTargetInformation);
|
||||||
exeAspect->setExecutable(FilePath::fromString(depFile.remoteFilePath()));
|
connect(target, &Target::kitChanged,
|
||||||
symbolsAspect->setFilePath(localExecutable);
|
this, &QnxRunConfiguration::updateTargetInformation);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Runnable QnxRunConfiguration::runnable() const
|
Runnable QnxRunConfiguration::runnable() const
|
||||||
@@ -100,6 +92,22 @@ Runnable QnxRunConfiguration::runnable() const
|
|||||||
return r;
|
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::QnxRunConfigurationFactory()
|
QnxRunConfigurationFactory::QnxRunConfigurationFactory()
|
||||||
|
@@ -48,6 +48,9 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ProjectExplorer::Runnable runnable() const override;
|
ProjectExplorer::Runnable runnable() const override;
|
||||||
|
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &) override;
|
||||||
|
|
||||||
|
void updateTargetInformation();
|
||||||
};
|
};
|
||||||
|
|
||||||
class QnxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
class QnxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
||||||
|
Reference in New Issue
Block a user