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

Method updateMarkType

kdevplatform/debugger/breakpoint/breakpoint.cpp:453–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453void 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
480void Breakpoint::assignUrl(const QUrl& url)
481{

Callers

nothing calls this directly

Calls 3

markChangeGuardMethod · 0.80
documentMethod · 0.45
lineMethod · 0.45

Tested by

no test coverage detected