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

Method restoreExpandState

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

Source from the content-addressed store, hash-verified

312}
313
314void ProjectTree::restoreExpandState(QStandardItem *item)
315{
316 QModelIndex index = d->itemModel->indexFromItem(item);
317 if (!index.isValid())
318 return;
319
320 bool expanded = item->data(Project::ItemExpandedRole).toBool();
321 if (!expanded) {
322 collapse(index);
323 return;
324 }
325
326 expand(index);
327 for (int i = 0; i < item->rowCount(); ++i) {
328 restoreExpandState(item->child(i));
329 }
330}
331
332void ProjectTree::selectProjectFile(const QString &file)
333{

Callers 1

handleItemUpdatedMethod · 0.80

Calls 5

indexFromItemMethod · 0.80
childMethod · 0.80
isValidMethod · 0.45
dataMethod · 0.45
rowCountMethod · 0.45

Tested by

no test coverage detected