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

Function forEachFile

kdevplatform/project/projectutils.cpp:35–47  ·  view source on GitHub ↗

* Runs the @p callback on all files that have @p projectItem as ancestor */

Source from the content-addressed store, hash-verified

33 * Runs the @p callback on all files that have @p projectItem as ancestor
34 */
35void forEachFile(const ProjectBaseItem* projectItem,
36 const std::function<void(ProjectFileItem*)>& callback)
37{
38 if (auto* file = projectItem->file()) {
39 callback(file);
40 return;
41 }
42
43 const auto children = projectItem->children();
44 for (const auto *child : children) {
45 forEachFile(child, callback);
46 }
47}
48
49QList<ProjectFileItem*> allFiles(const ProjectBaseItem* projectItem)
50{

Callers 4

allFilesFunction · 0.85
projectOpenedMethod · 0.85
testProjectFileSwapMethod · 0.85
benchProjectFile_swapMethod · 0.85

Calls 2

fileMethod · 0.45
childrenMethod · 0.45

Tested by 2

testProjectFileSwapMethod · 0.68
benchProjectFile_swapMethod · 0.68