forked from qt-creator/qt-creator
Debugger: Fix changing breakpoint enabled state
...for qml debugging. Handle the response explicitly because otherwise we end up with once modified break points which wrongly keep displaying the original state and therefore even refuse to trigger the change back until the debugging session ends. Fixes: QTCREATORBUG-17294 Task-number: QTCREATORBUG-19382 Change-Id: Idba9f2add915c965398bde1f0a46826e55067f08 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -718,6 +718,7 @@ void QmlEngine::updateBreakpoint(const Breakpoint &bp)
|
|||||||
bp->setEnabled(requested.enabled);
|
bp->setEnabled(requested.enabled);
|
||||||
} else if (d->canChangeBreakpoint()) {
|
} else if (d->canChangeBreakpoint()) {
|
||||||
d->changeBreakpoint(bp, requested.enabled);
|
d->changeBreakpoint(bp, requested.enabled);
|
||||||
|
d->breakpointsSync.insert(d->sequence, bp);
|
||||||
} else {
|
} else {
|
||||||
d->clearBreakpoint(bp);
|
d->clearBreakpoint(bp);
|
||||||
d->setBreakpoint(SCRIPTREGEXP, requested.fileName.toUrlishString(),
|
d->setBreakpoint(SCRIPTREGEXP, requested.fileName.toUrlishString(),
|
||||||
@@ -1739,6 +1740,16 @@ void QmlEnginePrivate::messageReceived(const QByteArray &data)
|
|||||||
breakpointsTemp.append(index);
|
breakpointsTemp.append(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else if (debugCommand == CHANGEBREAKPOINT) {
|
||||||
|
// v8message {"body":{"breakpoint":2,"type":"scriptRegExp"},"command":"changebreakpoint","request_seq":8,"running":true,"seq":9,"success":true,"type":"response"}
|
||||||
|
const int seq = resp.value("request_seq").toInt();
|
||||||
|
if (breakpointsSync.contains(seq)) {
|
||||||
|
Breakpoint bp = breakpointsSync.take(seq);
|
||||||
|
QTC_ASSERT(bp, return);
|
||||||
|
if (resp.value("success").toBool())
|
||||||
|
bp->setEnabled(!bp->isEnabled());
|
||||||
|
bp->update();
|
||||||
|
}
|
||||||
|
|
||||||
} else if (debugCommand == CLEARBREAKPOINT) {
|
} else if (debugCommand == CLEARBREAKPOINT) {
|
||||||
// DO NOTHING
|
// DO NOTHING
|
||||||
|
Reference in New Issue
Block a user