Commit d0c1f55a authored by Aurindam Jana's avatar Aurindam Jana
Browse files

QmlV8DebuggerClient: Show Exception Underline under correct line.



Change-Id: I30a38150930657109dba2a037de34a33ca4ebf1c
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent 2faf3b25
...@@ -1552,7 +1552,7 @@ void QmlV8DebuggerClient::highlightExceptionCode(int lineNumber, ...@@ -1552,7 +1552,7 @@ void QmlV8DebuggerClient::highlightExceptionCode(int lineNumber,
QList<QTextEdit::ExtraSelection> selections; QList<QTextEdit::ExtraSelection> selections;
QTextEdit::ExtraSelection sel; QTextEdit::ExtraSelection sel;
sel.format = errorFormat; sel.format = errorFormat;
QTextCursor c(ed->document()->findBlockByNumber(lineNumber)); QTextCursor c(ed->document()->findBlockByNumber(lineNumber - 1));
const QString text = c.block().text(); const QString text = c.block().text();
for (int i = 0; i < text.size(); ++i) { for (int i = 0; i < text.size(); ++i) {
if (! text.at(i).isSpace()) { if (! text.at(i).isSpace()) {
......
Markdown is supported
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