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

Method checkAnyState

src/plugins/smartut/utils/utils.cpp:259–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259bool Utils::checkAnyState(NodeItem *item, ItemState state)
260{
261 if (item->itemNode->asFileNode()) {
262 return item->state == state;
263 } else if (item->hasChildren()) {
264 for (int i = 0; i < item->rowCount(); ++i) {
265 if (checkAnyState(dynamic_cast<NodeItem *>(item->child(i)), state))
266 return true;
267 }
268 }
269 return false;
270}
271
272bool Utils::checkAllState(NodeItem *item, ItemState state)
273{

Callers

nothing calls this directly

Calls 4

childMethod · 0.80
asFileNodeMethod · 0.45
hasChildrenMethod · 0.45
rowCountMethod · 0.45

Tested by

no test coverage detected