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:
Christian Stenger
2024-01-26 11:02:37 +01:00
parent cf1a929916
commit 2bc0572553
2 changed files with 5 additions and 2 deletions

View File

@@ -942,7 +942,10 @@ static QString displayName(const WatchItem *item)
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);
if (valueCache.isEmpty() && this->address)
valueCache += QString::fromLatin1("@0x" + QByteArray::number(this->address, 16));