equal
deleted
inserted
replaced
51 provide information about the code being executed, such as the type |
51 provide information about the code being executed, such as the type |
52 of the called function, and the original source code location of the |
52 of the called function, and the original source code location of the |
53 current statement. |
53 current statement. |
54 |
54 |
55 If the called function is executing Qt Script code, you can obtain |
55 If the called function is executing Qt Script code, you can obtain |
56 the script location with the functions fileName(), lineNumber() and |
56 the script location with the functions fileName() and lineNumber(). |
57 columnNumber(). |
|
58 |
57 |
59 You can obtain the starting line number and ending line number of a |
58 You can obtain the starting line number and ending line number of a |
60 Qt Script function definition with functionStartLineNumber() and |
59 Qt Script function definition with functionStartLineNumber() and |
61 functionEndLineNumber(), respectively. |
60 functionEndLineNumber(), respectively. |
62 |
61 |
315 return -1; |
314 return -1; |
316 return d->lineNumber; |
315 return d->lineNumber; |
317 } |
316 } |
318 |
317 |
319 /*! |
318 /*! |
320 Returns the column number corresponding to the statement being |
319 \obsolete |
321 executed, or -1 if the column number is not available. |
|
322 |
|
323 The column number is only available if Qt Script code is being |
|
324 executed. |
|
325 |
|
326 \sa lineNumber(), fileName() |
|
327 */ |
320 */ |
328 int QScriptContextInfo::columnNumber() const |
321 int QScriptContextInfo::columnNumber() const |
329 { |
322 { |
330 Q_D(const QScriptContextInfo); |
323 Q_D(const QScriptContextInfo); |
331 if (!d) |
324 if (!d) |