Skip to content

BreakpointModel: assign the changed document url for the breakpoints

Currently, if a document is renamed to or saved as using a different url in KDevelop, any breakpoints associated with the previous url are not updated to use the current url of the document. Consequently, the breakpoints cannot be accessed from the resulting document and can only be further interacted with from the breakpoint tool view. Thus, most of the user's interactions with the document's breakpoints break after the renaming.

BreakpointModel also wrongly acts as if the document suddenly doesn't contain any of the breakpoints from before the document was renamed to or saved as, even though no such removal has happened. Therefore, the moving cursors can also possibly remain in the renamed document, and so the moving cursors' document urls won't equal to the out-of-date Breakpoint::url() after the rename. This is strictly wrong and will likely cause further bugs.

Fix these bugs by connecting to the IDocumentController::documentUrlChanged() signal and processing the changes to the document's url in the new BreakpointModel::documentUrlChanged() slot.

Merge request reports