forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user