forked from qt-creator/qt-creator
Debugger: further untangle of breakpoint item and marker
Change-Id: I9331912c1b53a0110479f46ef1e576676441ab75 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -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.
|
||||
|
@@ -93,7 +93,6 @@ private:
|
||||
friend class BreakHandler;
|
||||
friend class BreakpointManager;
|
||||
friend class BreakpointMarker;
|
||||
friend class GlobalBreakpointMarker;
|
||||
|
||||
void updateMarker();
|
||||
void updateMarkerIcon();
|
||||
|
Reference in New Issue
Block a user