Debugger: Also allow formatting negative numbers as hexadecimal

Change-Id: I0324c53b42424f25b1c70c10d3f31b515398712d
Reviewed-by: Tim Sander <tim@krieglstein.org>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2014-05-22 16:19:53 +02:00
parent 8c353f998e
commit 62904f32ef

View File

@@ -1319,11 +1319,14 @@ TypeFormatList WatchModel::typeFormatList(const WatchData &data) const
}
// Fixed artificial integral types.
data.value.toULongLong(&ok, 10);
QString v = data.value;
if (v.startsWith(QLatin1Char('-')))
v = v.mid(1);
v.toULongLong(&ok, 10);
if (!ok)
data.value.toULongLong(&ok, 16);
v.toULongLong(&ok, 16);
if (!ok)
data.value.toULongLong(&ok, 8);
v.toULongLong(&ok, 8);
if (ok) {
formats.append(DecimalIntegerFormat);
formats.append(HexadecimalIntegerFormat);