forked from qt-creator/qt-creator
ProjectManager: Fix Project::findNodeForBuildKey()
Amends c58da42bab.
This operates also on not-fully loaded projects now, which was
previously causing a crash on android projects.
Change-Id: I44eeb7af8ed53a47ef39e7f1bafb07b871879ce5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -886,9 +886,11 @@ bool Project::hasParsingData() const
|
|||||||
const ProjectNode *Project::findNodeForBuildKey(const QString &buildKey) const
|
const ProjectNode *Project::findNodeForBuildKey(const QString &buildKey) const
|
||||||
{
|
{
|
||||||
const ProjectNode *result = nullptr;
|
const ProjectNode *result = nullptr;
|
||||||
d->m_rootProjectNode->forEachProjectNode([buildKey](const ProjectNode *node) {
|
if (d->m_rootProjectNode) {
|
||||||
return node->buildKey() == buildKey;
|
d->m_rootProjectNode->forEachProjectNode([buildKey](const ProjectNode *node) {
|
||||||
});
|
return node->buildKey() == buildKey;
|
||||||
|
});
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user