Commit 8175f19f authored by hjk's avatar hjk
Browse files

qmldebugger: sanitize log message

parent bdfe2ed5
...@@ -679,16 +679,16 @@ void QmlEngine::messageReceived(const QByteArray &message) ...@@ -679,16 +679,16 @@ void QmlEngine::messageReceived(const QByteArray &message)
if (state() == InferiorRunOk) if (state() == InferiorRunOk)
notifyInferiorSpontaneousStop(); notifyInferiorSpontaneousStop();
QString logString = QString(command); QString logString = QString::fromLatin1(command);
StackFrames stackFrames; StackFrames stackFrames;
QList<WatchData> watches; QList<WatchData> watches;
QList<WatchData> locals; QList<WatchData> locals;
stream >> stackFrames >> watches >> locals; stream >> stackFrames >> watches >> locals;
logString += QLatin1String(" (") + QString::number(stackFrames.size()) + QLatin1String(" stack frames)"); logString += tr(" (%1 stack frames)").arg(stackFrames.size());
logString += QLatin1String(" (") + QString::number(watches.size()) + QLatin1String(" watches)"); logString += tr(" (%1 watches)").arg(watches.size());
logString += QLatin1String(" (") + QString::number(locals.size()) + QLatin1String(" locals)"); logString += tr(" (%1 loacals)").arg(locals.size());
for (int i = 0; i != stackFrames.size(); ++i) for (int i = 0; i != stackFrames.size(); ++i)
stackFrames[i].level = i + 1; stackFrames[i].level = i + 1;
......
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