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

Method attachMaybe

plugins/debuggercommon/mivariable.cpp:159–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157};
158
159void MIVariable::attachMaybe(QObject *callback, const char *callbackMethod)
160{
161 if (!m_varobj.isEmpty())
162 return;
163
164 // Try find a current session and attach to it
165 if (!ICore::self()->debugController()) return; //happens on shutdown
166 m_debugSession = static_cast<MIDebugSession*>(ICore::self()->debugController()->currentSession());
167
168 if (sessionIsAlive()) {
169 m_debugSession->addCommand(VarCreate,
170 QStringLiteral("var%1 @ %2").arg(nextId++).arg(enquotedExpression()),
171 new CreateVarobjHandler(this, callback, callbackMethod));
172 }
173}
174
175void MIVariable::markAsDead()
176{

Callers 5

addMethod · 0.80
addFinishResultMethod · 0.80
reinstallMethod · 0.80
VariableToolTipMethod · 0.80
handleMethod · 0.80

Calls 4

debugControllerMethod · 0.80
currentSessionMethod · 0.80
addCommandMethod · 0.60
isEmptyMethod · 0.45

Tested by

no test coverage detected