Debugger: Display unsigned hex values in watchhandler tooltip.

Change-Id: I2605c29ecb4417ce114702ef9d878343cc67b72d
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Friedemann Kleint
2013-07-05 15:51:28 +02:00
committed by hjk
parent 2a030ac95a
commit 2651b1aa7e

View File

@@ -358,6 +358,13 @@ QString WatchData::toToolTip() const
if (!displayedType.isEmpty())
formatToolTipRow(str, tr("Displayed Type"), displayedType);
QString val = valuetooltip.isEmpty() ? value : valuetooltip;
// Automatically display hex value for unsigned integers.
if (!val.isEmpty() && val.at(0).isDigit() && isIntType(type)) {
bool ok;
const quint64 intValue = val.toULongLong(&ok);
if (ok && intValue)
val += QLatin1String(" (hex) ") + QString::number(intValue, 16);
}
if (val.size() > 1000) {
val.truncate(1000);
val += tr(" ... <cut off>");