QString projectPartIdForFile(const QString &filePath) { const ProjectPart::Ptr projectPart = projectPartForFile(filePath); if (isProjectPartValid(projectPart)) return projectPart->id(); // OK, Project Part is still loaded return QString(); }
bool isProjectPartValid(const ProjectPart::Ptr projectPart) { if (projectPart) return CppModelManager::instance()->projectPartForId(projectPart->id()); return false; }