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

Method addChildrenFromFileSystem

kdevplatform/tests/testproject.cpp:122–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122void TestProjectUtils::addChildrenFromFileSystem(ProjectFolderItem* parent)
123{
124 constexpr QDir::Filters entryFilter = QDir::AllEntries | QDir::NoDotAndDotDot | QDir::Hidden;
125 QDirIterator it(parent->path().path(), {QStringLiteral("*")}, entryFilter);
126 while (it.hasNext()) {
127 it.next();
128 const auto info = it.fileInfo();
129 if (info.isDir()) {
130 const auto child = createChild<ProjectFolderItem>(parent, info.fileName());
131 addChildrenFromFileSystem(child);
132 } else {
133 createChild<ProjectFileItem>(parent, info.fileName());
134 }
135 }
136}
137
138#include "moc_testproject.cpp"

Callers

nothing calls this directly

Calls 4

pathMethod · 0.45
hasNextMethod · 0.45
nextMethod · 0.45
fileNameMethod · 0.45

Tested by

no test coverage detected