forked from qt-creator/qt-creator
Debugger: Display unsigned hex values in watchhandler tooltip.
Change-Id: I2605c29ecb4417ce114702ef9d878343cc67b72d Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -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>");
|
||||
|
||||
Reference in New Issue
Block a user