MCPcopy Create free account
hub / github.com/KDE/kdevelop / allImportedFiles

Function allImportedFiles

kdevplatform/language/duchain/navigation/usescollector.cpp:69–83  ·  view source on GitHub ↗

The returned set does not include the file itself @param visited should be empty on each call, used to prevent endless recursion

Source from the content-addressed store, hash-verified

67///The returned set does not include the file itself
68///@param visited should be empty on each call, used to prevent endless recursion
69void allImportedFiles(ParsingEnvironmentFilePointer file, QSet<IndexedString>& set,
70 QSet<ParsingEnvironmentFilePointer>& visited)
71{
72 const auto imports = file->imports();
73 for (const ParsingEnvironmentFilePointer& import : imports) {
74 if (!import) {
75 qCDebug(LANGUAGE) << "warning: missing import";
76 continue;
77 }
78 if (Algorithm::insert(visited, import).inserted) {
79 set.insert(import->url());
80 allImportedFiles(import, set, visited);
81 }
82 }
83}
84
85void UsesCollector::setCollectConstructors(bool process)
86{

Callers 1

startCollectingMethod · 0.85

Calls 4

insertFunction · 0.85
importsMethod · 0.45
insertMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected