ScriptConsole: Show File and Line Info

Show File and Line Info for items that have the info. Clicking
on the item opens the file and sets the cursor position on
the line. The context menu also provides option to copy contents
and option to clear the view.

Change-Id: I161de392ba35e37d323b049371619b01c617c798
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Aurindam Jana
2012-02-22 11:50:05 +01:00
parent d75d70c552
commit a167498ea1
15 changed files with 387 additions and 126 deletions

View File

@@ -63,12 +63,21 @@ void QDebugMessageClient::messageReceived(const QByteArray &data)
int type;
QDataStream ms(messagePacket);
ms >> type >> debugMessage;
emit message(QtMsgType(type), QString::fromUtf8(debugMessage.data()));
QDebugContextInfo info;
emit message(QtMsgType(type), QString::fromUtf8(debugMessage.data()),
info);
} else {
int type;
int line;
QByteArray debugMessage;
ds >> type >> debugMessage;
emit message(QtMsgType(type), QString::fromUtf8(debugMessage));
QByteArray file;
QByteArray function;
ds >> type >> debugMessage >> file >> line >> function;
QDebugContextInfo info;
info.line = line;
info.file = QString::fromUtf8(file);
info.function = QString::fromUtf8(function);
emit message(QtMsgType(type), QString::fromUtf8(debugMessage), info);
}
}
}