Commit caca06ad authored by hjk's avatar hjk

Debugger: Prevent multiline Value entries in Locals and Expressions

Change-Id: I8647875aa3cb31ecc0d89064c196df7852693bae
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent f2108c6a
...@@ -659,11 +659,11 @@ static QString quoteUnprintable(const QString &str) ...@@ -659,11 +659,11 @@ static QString quoteUnprintable(const QString &str)
int u = c.unicode(); int u = c.unicode();
if (c.isPrint()) if (c.isPrint())
encoded += c; encoded += c;
else if (u == '\r') else if (u == 10)
encoded += QLatin1String("\\r"); encoded += QLatin1String("\\r");
else if (u == '\t') else if (u == 9)
encoded += QLatin1String("\\t"); encoded += QLatin1String("\\t");
else if (u == '\n') else if (u == 13)
encoded += QLatin1String("\\n"); encoded += QLatin1String("\\n");
else else
encoded += QString::fromLatin1("\\%1") encoded += QString::fromLatin1("\\%1")
...@@ -769,6 +769,7 @@ QString WatchModel::formattedValue(const WatchData &data) const ...@@ -769,6 +769,7 @@ QString WatchModel::formattedValue(const WatchData &data) const
if (data.elided) { if (data.elided) {
QString v = value; QString v = value;
v.chop(1); v.chop(1);
v = translate(v);
QString len = data.elided > 0 ? QString::number(data.elided) QString len = data.elided > 0 ? QString::number(data.elided)
: QLatin1String("unknown length"); : QLatin1String("unknown length");
return v + QLatin1String("\"... (") + len + QLatin1Char(')'); return v + QLatin1String("\"... (") + len + QLatin1Char(')');
......
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