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
|
// running, as this can be triggered by moving the breakpoint to
|
||||||
// the next line that generated code.
|
// the next line that generated code.
|
||||||
|
|
||||||
m_gbp->m_params.lineNumber = lineNumber;
|
m_gbp->updateLineNumber(lineNumber);
|
||||||
m_gbp->update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateFileName(const FilePath &fileName) final
|
void updateFileName(const FilePath &fileName) final
|
||||||
{
|
{
|
||||||
TextMark::updateFileName(fileName);
|
TextMark::updateFileName(fileName);
|
||||||
QTC_ASSERT(m_gbp, return);
|
QTC_ASSERT(m_gbp, return);
|
||||||
m_gbp->m_params.fileName = fileName.toString();
|
m_gbp->updateFileName(fileName);
|
||||||
m_gbp->update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isDraggable() const final { return true; }
|
bool isDraggable() const final { return true; }
|
||||||
@@ -188,8 +186,7 @@ public:
|
|||||||
TextMark::move(line);
|
TextMark::move(line);
|
||||||
QTC_ASSERT(m_gbp, return);
|
QTC_ASSERT(m_gbp, return);
|
||||||
QTC_ASSERT(BreakpointManager::globalBreakpoints().contains(m_gbp), return);
|
QTC_ASSERT(BreakpointManager::globalBreakpoints().contains(m_gbp), return);
|
||||||
m_gbp->m_params.lineNumber = line;
|
m_gbp->updateLineNumber(line);
|
||||||
m_gbp->update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isClickable() const final { return true; }
|
bool isClickable() const final { return true; }
|
||||||
@@ -2261,6 +2258,18 @@ void GlobalBreakpointItem::removeBreakpointFromModel()
|
|||||||
theBreakpointManager->destroyItem(this);
|
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
|
QString GlobalBreakpointItem::markerFileName() const
|
||||||
{
|
{
|
||||||
// Some heuristics to find a "good" file name.
|
// Some heuristics to find a "good" file name.
|
||||||
|
@@ -93,7 +93,6 @@ private:
|
|||||||
friend class BreakHandler;
|
friend class BreakHandler;
|
||||||
friend class BreakpointManager;
|
friend class BreakpointManager;
|
||||||
friend class BreakpointMarker;
|
friend class BreakpointMarker;
|
||||||
friend class GlobalBreakpointMarker;
|
|
||||||
|
|
||||||
void updateMarker();
|
void updateMarker();
|
||||||
void updateMarkerIcon();
|
void updateMarkerIcon();
|
||||||
|
Reference in New Issue
Block a user