Commit 6f0a50be authored by hjk's avatar hjk
Browse files

debugger: synchronize breakpoints also at enable/disable operations

Task-number: QTCREATORBUG-2272
parent ce917a31
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment