| 272 | } |
| 273 | |
| 274 | Variable *Watches::addFinishResult(const QString& convenienceVarible) |
| 275 | { |
| 276 | removeFinishResult(); |
| 277 | |
| 278 | // resultVariable is a raw pointer cache that prevents repeated weak pointer access |
| 279 | auto* const resultVariable = currentSession()->variableController()->createVariable( |
| 280 | model(), this, convenienceVarible, returnValueVariableDisplayName()); |
| 281 | m_finishResult = resultVariable; |
| 282 | |
| 283 | appendChild(resultVariable); |
| 284 | resultVariable->attachMaybe(); |
| 285 | |
| 286 | return resultVariable; |
| 287 | } |
| 288 | |
| 289 | void Watches::removeFinishResult() |
| 290 | { |
no test coverage detected