| 451 | } |
| 452 | |
| 453 | void Breakpoint::updateMarkType() const |
| 454 | { |
| 455 | // Do we even have a mark? |
| 456 | |
| 457 | if (!m_model) |
| 458 | return; |
| 459 | |
| 460 | if (!m_movingCursor) |
| 461 | return; |
| 462 | |
| 463 | auto* const document = m_movingCursor->document(); |
| 464 | |
| 465 | // Yes, but don't update if type would not change: |
| 466 | const auto newMarkType = markType(); |
| 467 | Q_ASSERT(newMarkType); |
| 468 | const auto docLine = m_movingCursor->line(); |
| 469 | const auto oldMarkType = document->mark(docLine) & BreakpointModel::AllBreakpointMarks; |
| 470 | |
| 471 | if (oldMarkType == newMarkType) { |
| 472 | return; |
| 473 | } |
| 474 | |
| 475 | const auto guard = m_model->markChangeGuard(); |
| 476 | document->removeMark(docLine, BreakpointModel::AllBreakpointMarks); |
| 477 | document->addMark(docLine, newMarkType); |
| 478 | } |
| 479 | |
| 480 | void Breakpoint::assignUrl(const QUrl& url) |
| 481 | { |
nothing calls this directly
no test coverage detected