コード例 #1
0
ProductData ProjectPrivate::findProductData(const ProductData &product) const
{
    foreach (const ProductData &p, m_projectData.allProducts()) {
        if (p.name() == product.name() && p.profile() == product.profile())
            return p;
    }
    return ProductData();
}
コード例 #2
0
static ResolvedProductPtr internalProductForProject(const ResolvedProjectConstPtr &project,
                                                    const ProductData &product)
{
    foreach (const ResolvedProductPtr &resolvedProduct, project->products) {
        if (product.name() == resolvedProduct->name
                && product.profile() == resolvedProduct->profile) {
            return resolvedProduct;
        }
    }
    foreach (const ResolvedProjectConstPtr &subProject, project->subProjects) {
        const ResolvedProductPtr &p = internalProductForProject(subProject, product);
        if (p)
            return p;
    }
    return ResolvedProductPtr();
}