MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / expandedProjectDepth

Method expandedProjectDepth

src/plugins/project/mainframe/projecttree.cpp:284–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284void ProjectTree::expandedProjectDepth(const QStandardItem *root, int depth)
285{
286 if (!root)
287 return;
288
289 if (d->itemDepth(root) < depth) { //满足深度
290 expand(d->itemModel->indexFromItem(root));
291 for (int i = 0; i < root->rowCount(); i++) {
292 QStandardItem *childitem = root->child(i);
293 if (root->hasChildren()) {
294 expandedProjectDepth(childitem, depth);
295 }
296 }
297 }
298}
299
300void ProjectTree::expandedProjectAll(const QStandardItem *root)
301{

Callers

nothing calls this directly

Calls 5

indexFromItemMethod · 0.80
childMethod · 0.80
itemDepthMethod · 0.45
rowCountMethod · 0.45
hasChildrenMethod · 0.45

Tested by

no test coverage detected