forked from qt-creator/qt-creator
Debugger: Display length of quoted values
Reverts 6515f935d6 as this breaks
the dumper tests and moves the handling from the protocol to
the item, so this now only happens for the gui.
Change-Id: Ia15d5ead5c549585f4e90cc46d629961ea7d5974
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -753,7 +753,7 @@ QString decodeData(const QString &ba, const QString &encoding)
|
|||||||
|
|
||||||
if (enc.quotes) {
|
if (enc.quotes) {
|
||||||
const QChar doubleQuote('"');
|
const QChar doubleQuote('"');
|
||||||
result = QString("%1 (%2)").arg(doubleQuote + result + doubleQuote).arg(result.size());
|
result = doubleQuote + result + doubleQuote;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -942,7 +942,10 @@ static QString displayName(const WatchItem *item)
|
|||||||
|
|
||||||
void WatchItem::updateValueCache() const
|
void WatchItem::updateValueCache() const
|
||||||
{
|
{
|
||||||
valueCache = truncateValue(formattedValue(this));
|
QString formatted = truncateValue(formattedValue(this));
|
||||||
|
if (formatted.endsWith('"'))
|
||||||
|
formatted.append(QString(" (%1)").arg(this->value.length() - 2));
|
||||||
|
valueCache = formatted;
|
||||||
valueCache = watchModel(this)->removeNamespaces(valueCache);
|
valueCache = watchModel(this)->removeNamespaces(valueCache);
|
||||||
if (valueCache.isEmpty() && this->address)
|
if (valueCache.isEmpty() && this->address)
|
||||||
valueCache += QString::fromLatin1("@0x" + QByteArray::number(this->address, 16));
|
valueCache += QString::fromLatin1("@0x" + QByteArray::number(this->address, 16));
|
||||||
|
|||||||
Reference in New Issue
Block a user