From 8f3a0ebabbb03d6d95a354ad648d3a55b5ff0214 Mon Sep 17 00:00:00 2001 From: Andrii Semkiv Date: Wed, 16 Oct 2024 15:07:20 +0200 Subject: [PATCH] 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 --- src/plugins/debugger/breakhandler.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 5d0b25a3729..ad8be0e2f66 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -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: