MCPcopy Create free account
hub / github.com/KDAB/GammaRay / itemForSgNode

Method itemForSgNode

plugins/quickinspector/quickscenegraphmodel.cpp:414–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414QQuickItem *QuickSceneGraphModel::itemForSgNode(QSGNode *node) const
415{
416 while (node && !contains(m_itemNodeItemMap, node)) {
417 // If there's no entry for node, take its parent
418 auto it = m_childParentMap.find(node);
419 if (it == m_childParentMap.end()) {
420 // Can happen if the node belongs to another window and itemForSgNode() gets
421 // called during window selection change
422 return nullptr;
423 } else {
424 node = it->second;
425 }
426 }
427
428 auto it = m_itemNodeItemMap.find(node);
429 if (it != m_itemNodeItemMap.end()) {
430 return it->second;
431 }
432 return nullptr;
433}
434
435bool QuickSceneGraphModel::verifyNodeValidity(QSGNode *node)
436{

Callers 2

itemSelectionChangedMethod · 0.80
sgSelectionChangedMethod · 0.80

Calls 2

containsFunction · 0.85
endMethod · 0.80

Tested by 2

itemSelectionChangedMethod · 0.64
sgSelectionChangedMethod · 0.64