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

Method clear

src/plugins/debugger/interface/localtreemodel.cpp:204–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204void LocalTreeModel::clear()
205{
206 QWriteLocker locker(&mutex);
207 items.clear();
208 locker.unlock();
209
210 if (rootItem) {
211 beginRemoveRows(rootItem->index(), 0, rootItem->childCount() - 1);
212 rootItem->removeChildren();
213 endRemoveRows();
214 }
215}
216
217QModelIndex LocalTreeModel::indexForItem(const LocalTreeItem *item) const
218{

Callers

nothing calls this directly

Calls 4

childCountMethod · 0.80
removeChildrenMethod · 0.80
unlockMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected