Follow-up from "BreakpointModel: handle moving cursor invalidation"
The following discussions from !553 (merged) should be addressed:
-
@jatothrim started a discussion: (+3 comments) The test_breakpointmodel had three more tests developed for it, which I'm omitting from this MR, since two of them still fail for the reasons I have explained.
- external deletion of the document's file and subsequent closing of the document. This is now fixed, and should work.
- The model's
doc->textDocument()->clear()
behavior is incorrect and unfixable. - The model's behavior is also incorrect and unfixable when anything invokes 2. (like
openDocumentFromText()
ordoc->textDocument()->setText()
etc.)
With unfixable I mean that a fix needs to be done in upstream. If this is done, 2.
3.also gets automatically fixed. -
@igorkushnir started a discussion: (+9 comments) I think your detached concept is already easily implementable by simply not considering for removal breakpoints that have no moving cursor in
markChanged()
,markContextMenuRequested()
andtoggleBreakpoint()
. -
@igorkushnir started a discussion: (+5 comments) The out-of-sync mark line can also cause a removal of another unrelated inactive (mark-less) breakpoint even in the
setText()
andclear()
scenarios. But such a coincidence is highly unlikely to occur in practice. Plus it is going to be prevented by doing nothing ifmarkChanged(document, mark, MarkRemoved)
finds only an inactive breakpoint onmark.line
.