The returned set does not include the file itself @param visited should be empty on each call, used to prevent endless recursion
| 67 | ///The returned set does not include the file itself |
| 68 | ///@param visited should be empty on each call, used to prevent endless recursion |
| 69 | void 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 | |
| 85 | void UsesCollector::setCollectConstructors(bool process) |
| 86 | { |
no test coverage detected