Commit 7a847df2 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Fix CDB/output dumperversion correctly, dump maps correctly.

parent 41a9395d
......@@ -3480,7 +3480,7 @@ void *qDumpObjectData440(
"\"").put(((QT_VERSION >> 8) & 255)).put("\","
"\"").put(((QT_VERSION) & 255)).put("\"]");
d.put(",namespace=\""NS"\",");
d.put(",dumperversion=\"1.3\",");
d.put("dumperversion=\"1.3\",");
// Dump out size information
d.put("sizes={");
d.put("int=\"").put(sizeof(int)).put("\",")
......
......@@ -546,18 +546,22 @@ QList<WatchData> QtDumperResult::toWatchData(int source) const
WatchData &wchild = rc.back();
wchild.source = source;
wchild.iname = iname;
wchild.iname += dot;
wchild.iname += dchild.name;
// Name can be empty for array-like things
const QString iname = dchild.name.isEmpty() ? QString::number(c) : dchild.name;
// Use key entry as name (which is used for map nodes)
if (dchild.key.isEmpty()) {
wchild.name = dchild.name;
wchild.name = iname;
} else {
// Do not use map keys as iname since they might contain quotes.
wchild.name = decodeData(dchild.key, dchild.keyEncoded);
if (wchild.name.size() > 13) {
wchild.name.truncate(12);
wchild.name += QLatin1String("...");
}
}
// Append iname to total iname.
wchild.iname += dot;
wchild.iname += iname;
wchild.exp = dchild.exp;
if (dchild.valueEncountered) {
wchild.valuedisabled = dchild.valuedisabled;
......@@ -1349,7 +1353,7 @@ void QtDumperHelper::evaluationParameters(const WatchData &data,
case QAbstractItemType:
inner = data.addr.mid(1);
break;
case QVectorType:
case QVectorType:
if (m_qtVersion >= 0x040600)
extraArgs[1] = QString("(char*)&((%1).p->array)-(char*)((%2).p)")
.arg(data.exp).arg(data.exp);
......
Supports Markdown
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