DeclarativeToolsClient: Debugger Log

Log the debugIds of selected objects.

Change-Id: Id146ccfb39639d0e8550817d61101c82cce1fa9c
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
Aurindam Jana
2012-05-25 17:47:24 +02:00
parent 799fc18bd7
commit 6886dcb787
2 changed files with 11 additions and 7 deletions

View File

@@ -529,9 +529,9 @@ void DeclarativeToolsClient::log(LogDirection direction,
{ {
QString msg; QString msg;
if (direction == LogSend) if (direction == LogSend)
msg += QLatin1String(" sending "); msg += QLatin1String("sending ");
else else
msg += QLatin1String(" receiving "); msg += QLatin1String("receiving ");
InspectorProtocol::Message msgType InspectorProtocol::Message msgType
= static_cast<InspectorProtocol::Message>(message); = static_cast<InspectorProtocol::Message>(message);

View File

@@ -105,12 +105,16 @@ void QmlToolsClient::messageReceived(const QByteArray &message)
m_currentDebugIds.clear(); m_currentDebugIds.clear();
QList<int> debugIds; QList<int> debugIds;
ds >> debugIds; ds >> debugIds;
log(LogReceive, type + ':' + event,
QString("%1 [list of debug ids]").arg(debugIds.count())); QStringList debugIdStrings;
foreach (int debugId, debugIds) { foreach (int debugId, debugIds) {
if (debugId != -1) if (debugId != -1) {
m_currentDebugIds << debugId; m_currentDebugIds << debugId;
debugIdStrings << QString::number(debugId);
}
} }
log(LogReceive, type + ':' + event,
QString("[%1]").arg(debugIdStrings.join(QLatin1String(","))));
emit currentObjectsChanged(m_currentDebugIds); emit currentObjectsChanged(m_currentDebugIds);
} }
} else { } else {
@@ -333,9 +337,9 @@ void QmlToolsClient::log(LogDirection direction,
{ {
QString msg; QString msg;
if (direction == LogSend) if (direction == LogSend)
msg += QLatin1String(" sending "); msg += QLatin1String("sending ");
else else
msg += QLatin1String(" receiving "); msg += QLatin1String("receiving ");
msg += message; msg += message;
msg += QLatin1Char(' '); msg += QLatin1Char(' ');