QmakeProject: Centralize some code for subproject runconfig handling

Change-Id: Iecd8c326fc7fd1b1e7e5406fd899befc9fdd3c5b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
hjk
2017-12-19 13:54:16 +01:00
parent 048a05584c
commit 4b7c82b131
7 changed files with 31 additions and 46 deletions

View File

@@ -68,16 +68,10 @@ QList<BuildTargetInfo>
ProjectType::AuxTemplate});
}
QList<RunConfiguration *> IosRunConfigurationFactory::runConfigurationsForNode(Target *t, const Node *n)
bool IosRunConfigurationFactory::hasRunConfigForProFile(RunConfiguration *rc, const Utils::FileName &n) const
{
QList<RunConfiguration *> result;
foreach (RunConfiguration *rc, t->runConfigurations()) {
if (IosRunConfiguration *qt4c = qobject_cast<IosRunConfiguration *>(rc)) {
if (qt4c->profilePath() == n->filePath())
result << rc;
}
}
return result;
auto iosRc = qobject_cast<IosRunConfiguration *>(rc);
return iosRc && iosRc->profilePath() == n;
}
} // namespace Internal