Commit 4e6bec00 authored by hjk's avatar hjk
Browse files

debugger: show newlines in QStrings also in tooltips



Not necessarily needed, but more consistent.

Task-number: QTCREATORBUG-7278
Change-Id: I6c72b90fa18514aecccee9aa2de3ee626e681b60
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 867d6552
......@@ -350,8 +350,10 @@ QString WatchData::toString() const
static void formatToolTipRow(QTextStream &str,
const QString &category, const QString &value)
{
QString val = Qt::escape(value);
val.replace(QLatin1Char('\n'), QLatin1String("<br>"));
str << "<tr><td>" << category << "</td><td> : </td><td>"
<< Qt::escape(value) << "</td></tr>";
<< val << "</td></tr>";
}
QString WatchData::toToolTip() const
......@@ -366,7 +368,7 @@ QString WatchData::toToolTip() const
formatToolTipRow(str, tr("Internal Type"), QLatin1String(type));
formatToolTipRow(str, tr("Displayed Type"), displayedType);
QString val = value;
if (value.size() > 1000) {
if (val.size() > 1000) {
val.truncate(1000);
val += tr(" ... <cut off>");
}
......
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