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

Method restartDocumentLineTrackingAt

kdevplatform/debugger/breakpoint/breakpoint.cpp:358–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358void Breakpoint::restartDocumentLineTrackingAt(KTextEditor::Document& document, int line)
359{
360 Q_ASSERT(m_model);
361
362 stopDocumentLineTracking();
363
364 Q_ASSERT(line >= 0);
365 Q_ASSERT(line < document.lines());
366 m_movingCursor = document.newMovingCursor(KTextEditor::Cursor(line, 0));
367
368 // Add a breakpoint mark at the new cursor's location.
369 const auto guard = m_model->markChangeGuard();
370 m_movingCursor->document()->addMark(m_movingCursor->line(), markType());
371}
372
373KTextEditor::MovingCursor* KDevelop::Breakpoint::movingCursor() const {
374 return m_movingCursor;

Callers 1

Calls 5

markChangeGuardMethod · 0.80
CursorClass · 0.70
linesMethod · 0.45
documentMethod · 0.45
lineMethod · 0.45

Tested by

no test coverage detected