Debugger: further untangle of breakpoint item and marker

Change-Id: I9331912c1b53a0110479f46ef1e576676441ab75
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2019-10-17 14:35:25 +02:00
parent cc1399a4b6
commit fa8ff4108f
2 changed files with 15 additions and 7 deletions

View File

@@ -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.

View File

@@ -93,7 +93,6 @@ private:
friend class BreakHandler;
friend class BreakpointManager;
friend class BreakpointMarker;
friend class GlobalBreakpointMarker;
void updateMarker();
void updateMarkerIcon();