Commit 537eb2f1 authored by David Schulz's avatar David Schulz

Cdbext: Do not sort container children.

They are already sorted in an intended order.

Task-number: QTCREATORBUG-14872
Change-Id: If28d41eb220cb875fa5ef25f0fab075329900bff
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
parent 4f50aa74
......@@ -1104,6 +1104,7 @@ AbstractSymbolGroupNodePtrVector containerChildren(SymbolGroupNode *node, int ty
}
if (!size)
return AbstractSymbolGroupNodePtrVector();
node->addFlags(SymbolGroupNode::PreSortedChildren);
const unsigned maxArraySize = ExtensionContext::instance().parameters().maxArraySize;
if (size > maxArraySize)
size = maxArraySize;
......
......@@ -168,7 +168,7 @@ bool AbstractSymbolGroupNode::accept(SymbolGroupNodeVisitor &visitor,
break;
case SymbolGroupNodeVisitor::VisitContinue: {
AbstractSymbolGroupNodePtrVector c = children();
if (visitor.sortChildrenAlphabetically()) {
if (visitor.sortChildrenAlphabetically() && !testFlags(SymbolGroupNode::PreSortedChildren)) {
std::sort(c.begin(), c.end(), [](AbstractSymbolGroupNode *a, AbstractSymbolGroupNode *b) {
return a->name() < b->name();
});
......
......@@ -230,7 +230,8 @@ public:
AdditionalSymbol = 0x20, // Introduced by addSymbol, should not be visible
Obscured = 0x40, // Symbol is obscured by (for example) fake container children
ComplexDumperOk = 0x80,
WatchNode = 0x100
WatchNode = 0x100,
PreSortedChildren = 0x200
};
~SymbolGroupNode();
......
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