source: branches/4.5.1/src/scripttools/debugging/scripts/commands/disable.qs

Last change on this file was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 1.4 KB
Line 
1name = "disable";
2
3group = "breakpoints";
4
5shortDescription = "Disable breakpoint(s)";
6
7longDescription = "disable <breakpoint-id> : Disables the breakpoint with the given id.";
8
9seeAlso = [ "enable", "delete", "ignore" ];
10
11function execute() {
12 if (arguments.length == 0) {
13 // disable all breakpoints
14 state = 1;
15 scheduleGetBreakpoints();
16 } else {
17 var id = parseInt(arguments[0]);
18 if (isNaN(id)) {
19 message("Breakpoint id expected.");
20 return;
21 }
22 scheduleGetBreakpointData(id);
23 breakpointId = id;
24 state = 3;
25 }
26};
27
28function handleResponse(resp) {
29 if (state == 1) {
30 var breakpoints = resp.result;
31 if (breakpoints == undefined)
32 return;
33 for (var id in breakpoints) {
34 var data = breakpoints[id];
35 if (data.enabled) {
36 data.enabled = false;
37 scheduleSetBreakpointData(id, data);
38 }
39 }