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's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 6a3e2cb3
......@@ -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);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment