Commit 924115d7 authored by David Schulz's avatar David Schulz

Cdbext: Fix QMap dumper for Qt5...

... when the symbol was added as an expression.

It seems that calling GetSymbolTypeName somehow destroys the red-black tree,
so moved the call before creating the tree.

Change-Id: Iefb187df4e7f99cfd95195a6ac9a4d8c64fa2365
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
parent 1fad00f9
......@@ -943,6 +943,12 @@ static inline AbstractSymbolGroupNodePtrVector qMap5Nodes(const SymbolGroupValue
SymbolGroupValue root = head["left"];
if (!root)
return AbstractSymbolGroupNodePtrVector();
const std::string nodeType = qHashNodeType(v, "Node");
const std::string nodePtrType = nodeType + " *";
if (SymbolGroupValue::verbose)
DebugPrint() << v.type() << "," << nodeType;
RedBlackTreeNode *nodeTree =
RedBlackTreeNode::buildMapRecursion(root, head.address(), 0, "left", "right");
if (!nodeTree)
......@@ -951,10 +957,6 @@ static inline AbstractSymbolGroupNodePtrVector qMap5Nodes(const SymbolGroupValue
nodeTree->debug(DebugPrint(), debugQMap5Node);
VectorIndexType i = 0;
// Finally convert them into real nodes 'QHashNode<K,V> (potentially expensive)
const std::string nodeType = qHashNodeType(v, "Node");
const std::string nodePtrType = nodeType + " *";
if (SymbolGroupValue::verbose)
DebugPrint() << v.type() << "," << nodeType;
AbstractSymbolGroupNodePtrVector result;
result.reserve(count);
for (const RedBlackTreeNode *n = nodeTree->begin() ; n && i < count; n = RedBlackTreeNode::next(n), i++) {
......
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