| 146 | } |
| 147 | |
| 148 | void 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 | |
| 174 | void VariableToolTip::slotRangeChanged(int min, int max) |
| 175 | { |
nothing calls this directly
no test coverage detected