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

Method slotLinkActivated

kdevplatform/debugger/variable/variabletooltip.cpp:148–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void VariableToolTip::slotLinkActivated(const QString& link)
149{
150 Variable* v = m_var;
151 QItemSelection s = m_selection->selection();
152 if (!s.empty())
153 {
154 TreeItem* const item = m_model->itemForIndex(s.front().topLeft());
155 if (item)
156 {
157 auto* v2 = qobject_cast<Variable*>(item);
158 if (v2)
159 v = v2;
160 }
161 }
162
163 IDebugSession *session = ICore::self()->debugController()->currentSession();
164 if (session && session->state() != IDebugSession::NotStartedState && session->state() != IDebugSession::EndedState) {
165 if (link == QLatin1String("add_watch")) {
166 session->variableController()->addWatch(v);
167 } else if (link == QLatin1String("add_watchpoint")) {
168 session->variableController()->addWatchpoint(v);
169 }
170 }
171 close();
172}
173
174void VariableToolTip::slotRangeChanged(int min, int max)
175{

Callers

nothing calls this directly

Calls 10

closeFunction · 0.85
emptyMethod · 0.80
currentSessionMethod · 0.80
debugControllerMethod · 0.80
selectionMethod · 0.45
itemForIndexMethod · 0.45
stateMethod · 0.45
addWatchMethod · 0.45
variableControllerMethod · 0.45
addWatchpointMethod · 0.45

Tested by

no test coverage detected