From 6f0a50beefffd8333301cd28648d07ad31a60a04 Mon Sep 17 00:00:00 2001 From: hjk <qtc-committer@nokia.com> Date: Wed, 8 Sep 2010 08:15:54 +0200 Subject: [PATCH] debugger: synchronize breakpoints also at enable/disable operations Task-number: QTCREATORBUG-2272 --- src/plugins/debugger/breakhandler.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 48eef792032..dd706963548 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -432,10 +432,8 @@ bool BreakHandler::setData(const QModelIndex &index, const QVariant &value, int switch (role) { case BreakpointEnabledRole: - if (data->enabled != value.toBool()) { + if (data->enabled != value.toBool()) toggleBreakpointEnabled(data); - emit layoutChanged(); - } return true; case BreakpointUseFullPathRole: @@ -568,7 +566,15 @@ void BreakHandler::toggleBreakpointEnabled(BreakpointData *data) m_enabled.removeAll(data); m_disabled.append(data); } - updateMarkers(); + data->updateMarker(); + emit layoutChanged(); + m_engine->attemptBreakpointSynchronization(); +} + +void BreakHandler::toggleBreakpointEnabled(const QString &fileName, int lineNumber) +{ + BreakpointData *data = findBreakpoint(fileName, lineNumber); + toggleBreakpointEnabled(data); } void BreakHandler::appendBreakpoint(BreakpointData *data) @@ -612,15 +618,6 @@ void BreakHandler::toggleBreakpoint(const QString &fileName, int lineNumber) m_engine->attemptBreakpointSynchronization(); } -void BreakHandler::toggleBreakpointEnabled(const QString &fileName, int lineNumber) -{ - BreakpointData *data = findBreakpoint(fileName, lineNumber); - QTC_ASSERT(data, return); - data->enabled = !data->enabled; - data->updateMarker(); - m_engine->attemptBreakpointSynchronization(); -} - void BreakHandler::saveSessionData() { QTC_ASSERT(m_engine->isSessionEngine(), return); -- GitLab