Debugger: enable disable breakpoint by clicking

Disabled breakpoints can be enabled by just clicking on them.
Clicking an enabled breakpoint deletes it (just as before).

Change-Id: I651fb0f333d717db245ae0d06fcdfa6888cf8e7d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Andrii Semkiv
2024-10-16 15:07:20 +02:00
parent 7ca8776625
commit 8f3a0ebabb

View File

@@ -120,7 +120,10 @@ public:
void clicked() final
{
QTC_ASSERT(m_bp, return);
m_bp->deleteGlobalOrThisBreakpoint();
if (!m_bp->isEnabled())
m_bp->setEnabled(true);
else
m_bp->deleteGlobalOrThisBreakpoint();
}
public:
@@ -183,7 +186,10 @@ public:
void clicked() final
{
QTC_ASSERT(m_gbp, return);
m_gbp->removeBreakpointFromModel();
if (!m_gbp->isEnabled())
m_gbp->setEnabled(true);
else
m_gbp->removeBreakpointFromModel();
}
public: