forked from qt-creator/qt-creator
CppTools: fix infinite deep tree for "Included by"
"Included by" was infected by infinite deep tree in case of cyclic. Change-Id: If84fe52399f49d52baa42d681ab125d10d89dd3e Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -301,7 +301,11 @@ void CppIncludeHierarchyModel::buildHierarchyIncludedBy_helper(const QString &fi
|
||||
isCyclic);
|
||||
item->setLine(includeFile.line());
|
||||
parent->appendChild(item);
|
||||
buildHierarchyIncludedBy_helper(filePathFromSnapshot, item, cyclic, false);
|
||||
|
||||
if (isCyclic)
|
||||
continue;
|
||||
else
|
||||
buildHierarchyIncludedBy_helper(filePathFromSnapshot, item, cyclic, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user