forked from qt-creator/qt-creator
ProjectExplorer: Add method to find ProjectNodes
Change-Id: Ib8056bd7d5603ced67c3ce3514d49ec51d05e2cf Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -730,11 +730,6 @@ QString ProjectNode::vcsTopic() const
|
||||
return QString();
|
||||
}
|
||||
|
||||
QList<ProjectNode*> ProjectNode::projectNodes() const
|
||||
{
|
||||
return m_projectNodes;
|
||||
}
|
||||
|
||||
bool ProjectNode::canAddSubProject(const QString &proFilePath) const
|
||||
{
|
||||
Q_UNUSED(proFilePath)
|
||||
@@ -811,6 +806,18 @@ void ProjectNode::accept(NodesVisitor *visitor)
|
||||
folder->accept(visitor);
|
||||
}
|
||||
|
||||
ProjectNode *ProjectNode::projectNode(const Utils::FileName &file) const
|
||||
{
|
||||
return Utils::findOrDefault(m_projectNodes, [&file](const ProjectNode *fn) {
|
||||
return fn->filePath() == file;
|
||||
});
|
||||
}
|
||||
|
||||
QList<ProjectNode*> ProjectNode::projectNodes() const
|
||||
{
|
||||
return m_projectNodes;
|
||||
}
|
||||
|
||||
/*!
|
||||
Adds project nodes specified by \a subProjects to the node hierarchy and
|
||||
emits the corresponding signals.
|
||||
|
||||
Reference in New Issue
Block a user