source: branches/4.5.1/src/scripttools/debugging/scripts/commands/clear.qs@ 559

Last change on this file since 559 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.6 KB
Line 
1name = "clear";
2
3group = "breakpoints";
4
5shortDescription = "Clear breakpoint at specified location";
6
7longDescription = "clear <file>:<line> : Clear breakpoints at the given location.";
8longDescription += "\nclear <line> : Clear breakpoints at the given line of the current script.";
9
10seeAlso = [ "delete" ];
11
12argumentTypes = [ "script-filename" ];
13
14function execute() {
15 if (arguments.length == 0) {
16 message("Missing argument.");
17 return;
18 }
19 var arg = arguments[0];
20 var colonIndex = arg.lastIndexOf(':');
21 if (colonIndex == -1) {
22 lineNumber = parseInt(arg);
23 if (isNaN(lineNumber)) {
24 message("Breakpoint location must be of the form <file>:<line> or <line>.");
25 return;