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

Method handle

plugins/debuggercommon/mivariablecontroller.cpp:131–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 {}
130
131 void handle(const ResultRecord &r) override
132 {
133 if (r.hasField(QStringLiteral("locals"))) {
134 const Value& locals = r[QStringLiteral("locals")];
135
136 QStringList localsName;
137 localsName.reserve(locals.size());
138 for (int i = 0; i < locals.size(); i++) {
139 const Value& var = locals[i];
140 localsName << var[QStringLiteral("name")].literal();
141 }
142 int frame = m_session->frameStackModel()->currentFrame();
143 m_session->addCommand(StackListArguments,
144 // do not show value, low-frame, high-frame
145 QStringLiteral("0 %1 %2").arg(frame).arg(frame),
146 new StackListArgumentsHandler(localsName));
147 }
148 }
149
150private:
151 MIDebugSession *m_session;

Callers

nothing calls this directly

Calls 7

hasFieldMethod · 0.80
literalMethod · 0.80
currentFrameMethod · 0.80
addCommandMethod · 0.60
reserveMethod · 0.45
sizeMethod · 0.45
frameStackModelMethod · 0.45

Tested by

no test coverage detected