summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2019-10-17 14:10:32 +0200
committerDavid Schulz <david.schulz@qt.io>2019-10-17 13:04:20 +0000
commitcc1399a4b672aa4b9679b1febff3c8c762842612 (patch)
treed6727421ef86e16dd5f372a1e02a056de5b2bde0
parent418c7d108ac2324d1a10c7f769618eecae01f399 (diff)
downloadqt-creator-cc1399a4b672aa4b9679b1febff3c8c762842612.tar.gz
Debugger: Fix crash after breakpoint marker drag&drop
The updateMarker function deletes the marker of the global breakpoint so don't call that function from the marker. Fixes: QTCREATORBUG-23107 Change-Id: I377608f1a08b61451be1fc0be5bc15252252a4a7 Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--src/plugins/debugger/breakhandler.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 8befb49f8e..4beee1d5a6 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -170,7 +170,6 @@ public:
// the next line that generated code.
m_gbp->m_params.lineNumber = lineNumber;
- m_gbp->updateMarker();
m_gbp->update();
}
@@ -186,14 +185,11 @@ public:
void dragToLine(int line) final
{
+ TextMark::move(line);
QTC_ASSERT(m_gbp, return);
QTC_ASSERT(BreakpointManager::globalBreakpoints().contains(m_gbp), return);
- BreakpointParameters params = m_gbp->m_params;
- params.lineNumber = line;
- GlobalBreakpoint gbp = m_gbp;
- m_gbp = GlobalBreakpoint();
- gbp->deleteBreakpoint();
- m_gbp = BreakpointManager::createBreakpoint(params);
+ m_gbp->m_params.lineNumber = line;
+ m_gbp->update();
}
bool isClickable() const final { return true; }