Deduplicate KDevelop::ScopedIncrementor and MIBreakpointController::IgnoreChanges
I had failed to find MIBreakpointController::IgnoreChanges
at the time, so KDevelop::ScopedIncrementor
is currently in breakpointmodel.h. Fortunately the class is general enough to replace IgnoreChanges
.
ScopedIncrementor
should be moved into kdevplatform/util and shared as !524 (comment 860375) envisioned. Instead of instantiating IgnoreChanges
directly, MIBreakpointController
will have a private member function just like BreakpointModel::markChangeGuard()
and use it in the same way as BreakpointModel
.
I suspect there are more similar scope guards lurking in KDevelop code base. Once ScopedIncrementor
becomes reusable, they will be easier to deduplicate.