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

Method contextSelected

plugins/qmlsupport/qmlcontextextension.cpp:67–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void QmlContextExtension::contextSelected(const QItemSelection &selection)
68{
69 if (selection.isEmpty()) {
70 m_propertyModel->setObject(nullptr);
71 return;
72 }
73
74 const auto idx = selection.first().topLeft();
75 const auto context = idx.data(ObjectModel::ObjectRole).value<QQmlContext *>();
76 m_propertyModel->setObject(context);
77}

Callers

nothing calls this directly

Calls 3

isEmptyMethod · 0.45
setObjectMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected