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

Method parent

core/tools/objectinspector/bindingmodel.cpp:240–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240QModelIndex GammaRay::BindingModel::parent(const QModelIndex &child) const
241{
242 if (!m_bindings || !child.isValid())
243 return {};
244
245 BindingNode *parent = static_cast<BindingNode *>(child.internalPointer())->parent();
246 if (!parent)
247 return QModelIndex();
248
249 BindingNode *grandparent = parent->parent();
250
251 if (!grandparent)
252 return findEquivalent(*m_bindings, parent);
253
254 return findEquivalent(grandparent->dependencies(), parent);
255}

Callers 1

Calls 3

dependenciesMethod · 0.80
QModelIndexClass · 0.70
isValidMethod · 0.45

Tested by 1