diff options
-rw-r--r-- | src/plugins/debugger/breakhandler.cpp | 21 | ||||
-rw-r--r-- | src/plugins/debugger/breakhandler.h | 1 |
2 files changed, 15 insertions, 7 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 4beee1d5a6..22fd4a4008 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -169,16 +169,14 @@ public: // running, as this can be triggered by moving the breakpoint to // the next line that generated code. - m_gbp->m_params.lineNumber = lineNumber; - m_gbp->update(); + m_gbp->updateLineNumber(lineNumber); } void updateFileName(const FilePath &fileName) final { TextMark::updateFileName(fileName); QTC_ASSERT(m_gbp, return); - m_gbp->m_params.fileName = fileName.toString(); - m_gbp->update(); + m_gbp->updateFileName(fileName); } bool isDraggable() const final { return true; } @@ -188,8 +186,7 @@ public: TextMark::move(line); QTC_ASSERT(m_gbp, return); QTC_ASSERT(BreakpointManager::globalBreakpoints().contains(m_gbp), return); - m_gbp->m_params.lineNumber = line; - m_gbp->update(); + m_gbp->updateLineNumber(line); } bool isClickable() const final { return true; } @@ -2261,6 +2258,18 @@ void GlobalBreakpointItem::removeBreakpointFromModel() theBreakpointManager->destroyItem(this); } +void GlobalBreakpointItem::updateLineNumber(int lineNumber) +{ + m_params.lineNumber = lineNumber; + update(); +} + +void GlobalBreakpointItem::updateFileName(const FilePath &fileName) +{ + m_params.fileName = fileName.toString(); + update(); +} + QString GlobalBreakpointItem::markerFileName() const { // Some heuristics to find a "good" file name. diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h index 83d934034b..fa7434657f 100644 --- a/src/plugins/debugger/breakhandler.h +++ b/src/plugins/debugger/breakhandler.h @@ -93,7 +93,6 @@ private: friend class BreakHandler; friend class BreakpointManager; friend class BreakpointMarker; - friend class GlobalBreakpointMarker; void updateMarker(); void updateMarkerIcon(); |