Commit 2651b1aa authored by Friedemann Kleint's avatar Friedemann Kleint Committed by hjk

Debugger: Display unsigned hex values in watchhandler tooltip.

Change-Id: I2605c29ecb4417ce114702ef9d878343cc67b72d
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 2a030ac9
......@@ -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>");
......
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