MCPcopy Create free account
hub / github.com/KDE/kdevelop / createChild

Method createChild

plugins/debuggercommon/mivariable.cpp:48–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48MIVariable *MIVariable::createChild(const Value& child)
49{
50 if (!m_debugSession) return nullptr;
51 auto var = static_cast<MIVariable*>(m_debugSession->variableController()->createVariable(model(), this, child[QStringLiteral("exp")].literal()));
52 var->setTopLevel(false);
53 var->setVarobj(child[QStringLiteral("name")].literal());
54 bool hasMore = child[QStringLiteral("numchild")].toInt() != 0 || ( child.hasField(QStringLiteral("dynamic")) && child[QStringLiteral("dynamic")].toInt()!=0 );
55 var->setHasMoreInitial(hasMore);
56
57 // *this must be parent's child before we can set type and value
58 appendChild(var);
59
60 var->setType(child[QStringLiteral("type")].literal());
61 var->setValueToValueFieldOf(child);
62 var->setChanged(true);
63 return var;
64}
65
66MIVariable::~MIVariable()
67{

Callers 1

handleMethod · 0.80

Calls 12

modelFunction · 0.85
literalMethod · 0.80
setTopLevelMethod · 0.80
setVarobjMethod · 0.80
toIntMethod · 0.80
hasFieldMethod · 0.80
setHasMoreInitialMethod · 0.80
createVariableMethod · 0.45
variableControllerMethod · 0.45
setTypeMethod · 0.45
setChangedMethod · 0.45

Tested by

no test coverage detected