MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / cleanAndRefreshItem

Method cleanAndRefreshItem

Engine/FileSystemModel.cpp:1333–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1331}
1332
1333void
1334FileSystemModel::cleanAndRefreshItem(const FileSystemItemPtr& item)
1335{
1336 if (!item) {
1337 return;
1338 }
1339 QModelIndex idx = index(item.get(), 0);
1340 if ( idx.isValid() ) {
1341 int count = item->childCount();
1342 if (count > 0) {
1343 beginRemoveRows(idx, 0, count - 1);
1344 item->clearChildren();
1345 endRemoveRows();
1346 }
1347
1348 _imp->populateItem(item);
1349 }
1350}
1351
1352FileSystemItemPtr
1353FileSystemModel::getItem(const QModelIndex &index) const

Callers

nothing calls this directly

Calls 5

childCountMethod · 0.80
clearChildrenMethod · 0.80
populateItemMethod · 0.80
getMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected