Debugger: Debugger protocol maintenance

- Move DisplayFormat from watchhandler.h to debuggerprotocol.h
- Add/update a few comments about the use of the protocol enums
- Make decodeData take a DebuggerEncoding instead of an int

Change-Id: I50bed70a5da2e94da46e894bf9136bc14c9a1b23
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-08-12 11:26:10 +02:00
parent fb387ea2af
commit eca5ccdd3e
6 changed files with 107 additions and 74 deletions

View File

@@ -393,7 +393,7 @@ void WatchData::updateValue(const GdbMi &item)
GdbMi value = item["value"];
if (value.isValid()) {
int encoding = item["valueencoded"].toInt();
setValue(decodeData(value.data(), encoding));
setValue(decodeData(value.data(), DebuggerEncoding(encoding)));
} else {
setValueNeeded();
}
@@ -620,7 +620,7 @@ void parseChildrenData(const WatchData &data0, const GdbMi &item,
QByteArray key = child["key"].data();
if (!key.isEmpty()) {
int encoding = child["keyencoded"].toInt();
data1.name = decodeData(key, encoding);
data1.name = decodeData(key, DebuggerEncoding(encoding));
}
childHandler(data1, child);
}